PDA

View Full Version : Plugin Links and varibles


cory_booth
15 Nov 2009, 22:59
I am learning the new link format by using plugins to add tabs to the navbar.
I go that working.

The next problem I have though is some of my 3.8 links used userid varibles as part of the url.

i.e.
<li><a href="http://xxxxxxxxxx.com/showcat.php?cat=999&user={vb:raw (or var) bbuserinfo.userid}">My Stuff</a></li>

I have tried everything from "' to '" to ". to '". to get this working and can't seem to figure it out.

Any help?

Lynne
15 Nov 2009, 23:25
This would be the correct link to put into a template:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



If it's in a plugin, you may need to just use $vbulletin->userinfo['userid'] as before. Hard to tell from what you've written.

cory_booth
15 Nov 2009, 23:34
Yes this is a plugin.

I get Parse error: syntax error, unexpected T_STRING in /home1/gggggggggggg/public_html/yyyyyy/includes/class_bootstrap.php(685) : eval()'d code on line 85

If I copy paste
$vbulletin->userinfo['userid']

Lynne
15 Nov 2009, 23:36
That tells me absolutely nothing. What does the whole plugin look like? You could (and do) have a syntax error and I can't see it if you don't post the code.

cory_booth
15 Nov 2009, 23:39
I added the ===== to show what I am struggling with.




Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Lynne
15 Nov 2009, 23:53
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



(You really should have posted this in the article and I would have known right away exactly where you were talking about and what you wanted to modify.)

cory_booth
15 Nov 2009, 23:56
Sorry...

Thought is was an easy correction and I worry about hacks :-)