PDA

View Full Version : Custom plugin help request


dimopoulos
08-07-2008, 08:58 PM
Greetings,

I have read quite a bit on hooks in the article section so I decided to give it a go.

I created a plugin which hooks to the global_start. It queries the blogs and picks the last 10 entries from it. It then stores it in a variable which I can use.

Everything works fine if I put the variable to be 'echo'ed in the footer lets say. However when I put the variable in the sidebar (I am using the Ultimate sidebars product) it just doesn't display.

Any ideas as to how I can make a variable that clearly has data work inside another plugin?

Pointers are more than appreciated.

Opserty
08-07-2008, 10:26 PM
For the sidebar, do you enter the contents into a template or is it some other custom box?

dimopoulos
08-08-2008, 02:09 PM
The sidebar is

https://vborg.vbsupport.ru/showthread.php?t=175181

This incorporates a few templates that create the boxes on the sidebar. When the plugin runs the $blogPrint variable is populated. I know this because if I echo it in the footer it works. When I put it in the template of the sidebar it doesn't. I am guessing it is a scope issue. Is there a way to inject that variable in the particular template?

Does that make sense?

Opserty
08-08-2008, 05:14 PM
If it is a scope issue maybe try: $GLOBALS[blogPrint]