PhotoPlog

PhotoPlog (http://www.photoplog.com/forum/index.php)
-   Troubleshooting & Problems (http://www.photoplog.com/forum/forumdisplay.php?f=6)
-   -   Blank page (http://www.photoplog.com/forum/showthread.php?t=1188)

Bashy 05-06-2007 06:09 PM

Yep, the error has disappeared

I checked the navbar template for any in_array

and the only 1 i found was this
Code:

<if condition="(in_array($vbulletin->userinfo[usergroupid], $links_groups))"><td class="vbmenu_control"><a href="adv_quick_links.php">$vbphrase[adv_quick_links]</a></td></if>
            <td id="newlink" class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a> <script type="text/javascript"> vbmenu_register("newlink"); </script></td>
        </if>

Does this help any?

Morgan 05-06-2007 06:13 PM

Yep, the $links_groups variable is from the Advanced Quick Links modification. Add links_groups to the PhotoPlog Global Variables setting via the ACP and see if the warning message goes away.

Bashy 05-06-2007 06:36 PM

1 Attachment(s)
Ok, i think i done that, is this the right place cause the error is still there (see image please)

Morgan 05-06-2007 06:42 PM

Yes, that is the correct location. Try temporarily removing the entire in_array template conditional from the navbar template. Does the in_array warning goes away?

Bashy 05-06-2007 06:51 PM

Just commented out the array and it still gives the error...Not looking good is it lol
Perhaps just turn off the error reporting and leave it at that?
Photoplog appears to be working fine and to be honest i aint got a clue how
long this error has been there as i did not know about the error reporting line
therefore i aint never seen the error before!

What do you think?

Morgan 05-06-2007 07:02 PM

The problem is with the Advanced Quick Links modification. It doesn't set $links_groups to be an array unless you are viewing the adv_quick_links.php file. As such you get a "wrong datatype for second argument" error because $links_groups is a string instead of an array. Keep links_groups in the PhotoPlog Global Variables setting, and add this to a plugin located at the global_start hook:
Code:

$links_groups = explode(',', $vbulletin->options['links_usergroups']);
Otherwise, remove (not comment out, actually remove) the following from the navbar template:
Code:

<if condition="(in_array($vbulletin->userinfo[usergroupid], $links_groups))">
        <td class="vbmenu_control"><a href="adv_quick_links.php">$vbphrase[adv_quick_links]</a></td>
</if>

When you gets errors like this, it is my opinion that you should fix them instead of hide them by turning off error reporting. You never know what new errors you are going to get in the future, especially with the amount of modifications you install. If you just go and hide errors, you might wind up with a pile of foo and that could turn into a debugging nightmare when you really need to fix something.

Bashy 05-06-2007 07:06 PM

Yeah i know what ya saying, and if anything im prob about the worst for installing hacks :o lol

When you say this, do you mean create a new plugin?

Quote:

Originally Posted by Morgan (Post 11263)
add this to a plugin located at the global_start hook:
Code:

$links_groups = explode(',', $vbulletin->options['links_usergroups']);


Morgan 05-06-2007 07:10 PM

Yep, create a new plugin. Use 'Advanced Quick Links' as the product.

Bashy 05-06-2007 07:17 PM

Wahooo, thats it, the error is no more!!

Thanks alot for your patience and time, tis much appreciated :)

Bashy 05-06-2007 07:19 PM

Actually not sure whats happened here but in my navbar i now have a link called this Advanced Quick Links was this meant to be there all the time? lol


All times are GMT. The time now is 06:53 AM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.