PDA

View Full Version : vb4 postbit link


wampforum
March 16th, 2010, 01:21 PM
is there a way to add a link in a users postbit to their photopost gallery? I found a mod but it wont accept the url in the correct way (ie i can link to the main photopost gallery but not a specific users.
mysite.com/photopost?u= (mod adds user id number on the end
but to get to a specific photopost gallery requires a url like this:
mysite.com/photopost/u1-username.html am i correct?
the only other info i can find is for older vbulletin versions!

Chuck S
March 16th, 2010, 01:59 PM
yes the variables depend on what vb defines them as like I know in the old vb3 it was I think $postbit[userid] and $postbit[username] maybe. So whatever link you place in your postbit will work as long as you create the url filled in where the 1 is to the users userid in vb and username is the username.

I dont know what the variables are for vb4 never have hacked anything in the postbit personally

Chuck S
March 16th, 2010, 02:02 PM
try


http://www.yoursite.com/photopost/u{vb:raw post.userid}-{vb:raw post.username}.html

wampforum
March 16th, 2010, 02:47 PM
cheers chuck but it throws this up:
The requested URL /photopost/u{vb:raw post.userid}-{vb:raw post.username}.html1 was not found on this server.

changing it to this:
http://www.mysite.com/photopost/?u={vb:raw%20post.userid}-{vb:raw%20post.username}.html1

takes me to the main gallery page but not the personal one.

maybe its just something that aint do-able!

Chuck S
March 16th, 2010, 03:16 PM
what I posted should work if we are talking about the postbit template

Chuck S
March 16th, 2010, 03:25 PM
like I said I have never tried it but its all about using the proper code in the proper template for instance it is memberinfo not post and the template is memberinfo_dropdown


<li class="left">
<a href="http://www.reeftalk.com/gallery/u{vb:raw memberinfo.userid}-{vb:raw memberinfo.username}.html}">
<img src="{vb:stylevar imgdir_siteicons}/profile.png" alt="" />
View Member Photos
</a>
</li>
{vb:raw template_hook.memberaction_dropdown_items}

wampforum
March 16th, 2010, 03:57 PM
no it was the postbit I wanted (though the member info ones handy too - still cant get that one to work though bringing up the same error

Chuck S
March 16th, 2010, 05:19 PM
I think you misunderstand here

Left view (http://www.reeftalk.com/forums/showthread.php/5384-Left-view)

The memberinfo_dropdown template is the one that drops down on the postbit in vb4

;) it indeed works as I posted

wampforum
March 17th, 2010, 04:34 AM
ah right I gotcha. I wanted to add the link in the section below where each users reputation,avatar,post count etc sit.
Anyway no matter where I put it I cant get this damn link to work - its beyond me!
thanks for trying anyway Chuck

Chuck S
March 17th, 2010, 05:54 AM
well as long as you use the proper variables it should work

http://www.yoursite.com/photopost/u{vb:raw post.userid}-{vb:raw post.username}.html

that is the proper format for the postbit template as posted

wampforum
March 17th, 2010, 07:05 AM
yeah I imagine its me not understanding it right to be honest.
no matter how i put this link:
http://www.yoursite.com/photopost/u{vb:raw post.userid}-{vb:raw post.username}.html
its bringing up the error - am i just changing the url and nothing else?

Chuck S
March 17th, 2010, 08:56 AM
works fine in postbit


<span class="usertitle">
{vb:raw post.usertitle}
</span>
<span class="usertitle">
<a href="http://www.reeftalk.com/gallery/u{vb:raw post.userid}-{vb:raw post.username}.html">
View Member Photos
</a>
</span>

wampforum
March 17th, 2010, 10:44 AM
ah thats got it working. now just need to get it in the right place
thanks Chuck for sticking with me!!

Chuck S
March 17th, 2010, 12:26 PM
yeah I mean the variables are pretty absolute which is why I did not know why yours did not work

wampforum
March 17th, 2010, 12:38 PM
to be honest probably me putting it in the wrong place or something!

Chuck S
March 17th, 2010, 12:48 PM
well enjoy