Recent Topics

1 Dec 06, 2008 01:01    

My b2evolution Version: 2.x

Hello.

How to access a blog's properties from within the file, 'user.funcs.php'? :?:

I see within that file the presence of the '$edited_Blog' var and it's also part of the 'global' statement, but it seems to be unset.

Therefore, I added a construct for it '$edited_Blog = & new Blog();' but it has no properties for the blog I've selected on the frontend menu. I want to be able to access the 'get_settings()' method from within 'user.funcs.php' for that selected blog.

Thanks in advance.

2 Dec 06, 2008 09:25

Assuming you're on about this function, you *might* be able to get away with adding $Blog to the globals

/**
 * Template tag: Get a link to new user registration
 * @param string
 * @param string
 * @param string
 * @param boolean Display the link, if the user is already logged in? (this is used by the login form)
 * @param string Where to redirect
 * @return string
 */
function get_user_register_link( $before = '', $after = '', $link_text = '', $link_title = '#', $disp_when_logged_in = false, $redirect = null )
{
	global $htsrv_url_sensitive, $Settings, $edited_Blog, $generating_static;

¥

3 Dec 07, 2008 02:50

Yep, that did it, ¥åßßå. Thanks! :D


Form is loading...