Home » Forum
NoNumber!

Joomla!® Websites & Extensions
development  -  support  -  consultancy

I try to respond within 48 hours (excluding weekends).
If I haven't responded by then, feel free to post a reminder or bug me via email.

My last reply was: 2 Hours, 17 Minutes ago.

Welcome, Guest
Please Login or Register.    Lost Password?

Problems regarding embedding minibb
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Problems regarding embedding minibb
#255
Problems regarding embedding minibb 3 Years, 6 Months ago  
Hi!

I noticed that you here also use minibb - good

I want to embedd minibb in Joomlas content div by inserting it like this:

{source}
<?PHP
$dir=getcwd();
chdir ("/home/jogger/www/forum");
include ('./index.php');
chdir ($dir);
?>
{/source}

My problem: I do not have any global variables of minibb available (e.g. all the language variables $l_xxxxxx) - resulting in a void replacing of {$xxxx}-variables in minibbs templates.
The $GLOBALS array only shows a few Joomla specific indices.

Is there a way to make minibbs variables available to it so that it work?

Best regards (and keep up this good work!),
Chris
jogger
Posts: 3
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#256
Problems regarding embedding minibb 3 Years, 6 Months ago  
Hi Chris,
I haven't found a good solution to embed minidb into Joomla. There is not component or plugin for it yet.
This forum is not in the joomla site either. I have just copy and pasted the header and footer part of my Joomla site into the forum header and footer files.
So it's not dynamic like the rest of the site, but anyway, it works.
Peter van Westen
Admin
Posts: 9169
User Online NowClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#263
Problems regarding embedding minibb 3 Years, 6 Months ago  
Hi,

thanks for your quick answer!

I think I found the problem:

All scripts evaluated by your plugin are resting in a local context of a function (or something else - please correct me, if I am wrong) so all variables in minibbs global context are not global anymore and thus are not available in $GLOBALS.

So what I'm searchng for is a way to reset a local context to the global one:

Now we have this scenario:

function blahblah ()
{
// we are in local context now
eval ('include (index.php)'); // include minibbs index.php
}

But I need this:

function blahblah ()
{
// we are in local context now
changeToGlobal ();
// we are now in global context
eval ('include (index.php)'); // include minibbs index.php
}

Is there a way to set the context in PHP?

Can you tell me where exactly your plugin evals the content code?

Regards,
Chris
jogger
Posts: 3
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#264
Problems regarding embedding minibb 3 Years, 6 Months ago  
You can try to change the helper.php file.
Look for what I did to keep the $_REQUEST variable (line 95 and 102).
You could try to do that with the $GLOBALS too...
Don't know if that will work.
Peter van Westen
Admin
Posts: 9169
User Online NowClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#265
Problems regarding embedding minibb 3 Years, 6 Months ago  
Unfortunately this doesn't help

miniBB uses and creates global vars from the beginning to the end - so I would have to "export" after every use of a variable to hold the global context consistent. A horrible work to do this ...

Chris
jogger
Posts: 3
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#6289
Problems regarding embedding minibb 2 Years, 1 Month ago  
Hi Peter,

I'm also having a problem with global variables. I tried the following as a Sourcerer insert:


$foo = 99;

function bar()
{
   global $foo;
   echo "foo is ".$foo;
}

bar();

And I get that $foo is empty. When I run this code normally in a separate PHP, I get "foo is 99" as expected.

When I print_r $GLOBALS in Sourcerer I see many items that are not null but many items (including foo) that are.

What is going on? I could understand if globals from outside Sourcerer were undefined within it, if you set up a completely new eecution context. But why don't globals *within* Sourcerer work?

Thanks in advance.
timmilicious
Posts: 8
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#6454
Re: Problems regarding embedding minibb 2 Years, 1 Month ago  
I am having the same issue with global variables. They seem not to work in php code embedded in sourcerer. Has anyone found a solution for this? BTW: This sourcerer is a great plugin, congratulations Peter. regards
John Paterson
Posts: 1
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#6470
Re: Problems regarding embedding minibb 2 Years, 1 Month ago  
What globals do you mean? Accross different {source} blocks? Or globals defined by Joomla?
If the latter: that is correct. What global var are you trying to use?
Peter van Westen
Admin
Posts: 9169
User Online NowClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
Go to topPage: 1
Moderators: Peter van Westen
Open Source Training | Online Joomla! Training and Support
MaxCDN | Content Delivery Network | Accelerate your site to the max
hosting joomla