Recent Topics

1 Apr 18, 2006 12:58    

For v1.8, exits to the blog your currently working to instead of the baseurl.

It's for the link Exit to blogs in the backoffice.

Around line 41 in \blogs\conf\_application.php there will be '$app_exit_links =' and something.

Change it to this;

$app_exit_links = '<a href="'.$htsrv_url.'login.php?action=logout">'.T_('Logout').'</a>
									&bull; <a href="'.$baseurl;
if( isset( $_GET['blog'] ) )
$app_exit_links .= '?blog='.$_GET['blog'];
$app_exit_links .= '">'.T_('Exit to blogs').'
									<img src="'.$rsc_url.'icons/close.gif" width="14" height="14" border="0" class="top" alt="" title="'
									.T_('Exit to blogs').'" /></a><br />';

2 Nov 01, 2006 04:08

hello there !

a quick one please: no rush ;)

I actually found this code, not in \blogs\conf\_application.php (I looked, it wasn't there), but in /skins_adm/legacy/_adminUI.class.php. with b2evo 1.8.2, plain skin.

and this is what I found:

.'<a href="'.$htsrv_url.'login.php?action=logout&amp;redirect_to='.$admin_url.'">'.T_('Logout').'</a>
				&bull;
				<a href="'.( isset($Blog) ? $Blog->get('url') : $baseurl ).'">'.T_('Exit to blogs').'
					<img src="'.$rsc_url.'icons/close.gif" width="14" height="14" border="0" class="top" alt="" title="'
					.T_('Exit to blogs').'" /></a>


which is nearly the same (but not quite yet), and after a few trials, as usual, I can't get it working. (I really tried a few things, I really have, but I'm only good with cut&paste stuff, not with scripts).

could you help me please?

Much appreciated

3 Nov 01, 2006 04:23

Umm, this hack was written a while back before 1.8 was public, i will look into it when i have time.

4 Nov 01, 2006 04:39

Sylv, in 1.8 it should already work this way: if a global $Blog exists, it will get used in the "Exit..." link.

About /skins_adm/legacy/_adminUI.class.php: this only gets used if you use the "legacy" admin skin (check your profile). Of course, if always helps to just put an "echo 'foo';" statement somewhere to see if a given code block actually gets executed.

Probably you've "just" found a place in the backoffice, where this does not work as expected. It should work at least from the "Write" tab (and use the selected blog from the "New post in blog:" selector).

5 Nov 01, 2006 04:52

thank you guys :D

Actually, it works fine at all times.............except when a post is edited or saved or else. when you do that, you get the screen for the pings. it is then that the redirection goes wrong.

What I have to do is click another tag, just for the sake of it ( it I mean: to come back to the right blog database), and only then the redirection works. new users may not understand that, ( t'bit annoying I say :'( )

cheers

8 Nov 01, 2006 07:09

Thank you too

but ever since you've posted that link, I've been trying (downloading, copying, etc). All I can understand (I think) is that the changed code is

// For the "Exit to blogs..." link:
$Blog = $edited_Item->get_Blog();

:lol: Gimme another 1200 posts or so here, and [u]maybe[/u], I would crack the code :lol:

9 Nov 01, 2006 07:14

Sylv wrote:

Thank you too

but ever since you've posted that link, I've been trying (downloading, copying, etc). All I can understand (I think) is that the changed code is

// For the "Exit to blogs..." link:
$Blog = $edited_Item->get_Blog();

Just download the new file from;
http://evocms.cvs.sourceforge.net/*checkout*/evocms/b2evolution/blogs/inc/CONTROL/items/edit_actions.php?pathrev=v-1-8
and replace it with your old one.

Sylv wrote:

:lol: Gimme another 1200 posts or so here, and [u]maybe[/u], I would crack the code :lol:

Haha yeh :P

10 Nov 01, 2006 07:29

yes, I did copy the whole thing in /_adminUI.class.php, but I get:

Fatal error: Call to a member function on a non-object on line 22

???

11 Nov 01, 2006 07:32

Eh, thats because the file we are linking to above is;
b2evolution/blogs/inc/CONTROL/items/edit_actions.php

Not _adminUI.class.php ....

12 Nov 01, 2006 07:45

wow, thats because, I was so concentrating on the code....I didn't even noticed the title of the page. :oops:

New learner is getting it

IT'S GRAND !!

All working beautifully now, I'm godsmacked, only 1198 posts to go

Thanks to both of you, really.

13 Nov 01, 2006 07:56

Hehe, you still have a fair while to go, and by the time you do, we've probz hit another +1000 helping you get there :P

Nah, learners are good, and enthusiastic learners are better, because hopefully one day it's less work for us :) Which you seem to have already done in one of your posts :)

Don't worry, you'll get there :) one day... :P

14 Nov 01, 2006 08:10

Thanks mate !

(I think I've already helped a couple of people English/french)

I like the spirit of this forum, it's dedicated full power, backed up with substantiality.

15 Nov 05, 2006 07:29

ok.............updating:

now, my users see these tabs:

1 - write
2 - posts
3 - categories
4 - blog settings (disabled)
5 - my profile
6 - tools

from 1, 2 and 3, they exit to their own blog
but for 4, 5 & 6, they go to the base url

I didn't see that before. sorry

can you help please?

Thank you

16 Nov 05, 2006 08:04

Well thats because for 5&6 you are not actually browsing a blog... So there is no blog param flying around...

Your situation is a special case.

17 Nov 05, 2006 08:10

still......if I'm a user and I think : 'OK, let change my profile !'
do done, go back to my blog, .......oh hold on: thats not mine !!

why the exception?

18 Nov 05, 2006 08:13

Because you have blogs per user, there is no way of knowing which blog is attached to each user unless we do some heavy hacking.

This hack just simply uses the $blog param that gets passed around, you'll see it in your url bar every now and then.

19 Nov 05, 2006 08:18

Ok......I think I sort of understand.......I'll live with that..........

but beware, I'm not far away !!!!! ;)

Thank you


Form is loading...