Add reputation for images in Albums?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mobosix
    Senior Member
    • Oct 2003
    • 299
    • 4.2.X

    Add reputation for images in Albums?

    Can someone tell me what code I need to place in my template to allow members to add reputation to the user that uploaded an image into their Album?

    I pulled this code out of the postbit template:

    Code:
    <if condition="$show['reputationlink']">
                <span id="reputationmenu_$post[postid]"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow" id="reputation_$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a></span>
                <if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if>
            </if>
    But I'm not sure if I can just plug it into another template where I want it. (I tried it in the album_pictureview template with no luck).
  • Mark.B
    vBulletin Support
    • Feb 2004
    • 24275
    • 6.0.X

    #2
    Originally posted by mobosix
    Can someone tell me what code I need to place in my template to allow members to add reputation to the user that uploaded an image into their Album?

    I pulled this code out of the postbit template:

    Code:
    <if condition="$show['reputationlink']">
                <span id="reputationmenu_$post[postid]"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow" id="reputation_$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a></span>
                <if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if>
            </if>
    But I'm not sure if I can just plug it into another template where I want it. (I tried it in the album_pictureview template with no luck).
    That won't work because it's trying to add reputation to a post, and since you're not in a post there is no value for $post[postid] so you get an error.

    What you're trying to do will require custom code since reputation.php is looking for a postid, and there is no post.

    You cannot even hard code a postid in since you can only rep a post once.

    You'll need custom code to add add reputation to a user's total based on the albumid. Going to be one for www.vbulletin.org this. I agree it'd be a nice idea though.
    MARK.B
    vBulletin Support
    ------------
    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

    Comment

    • mobosix
      Senior Member
      • Oct 2003
      • 299
      • 4.2.X

      #3
      That's what I was afraid of I also tried to add the rep to Downloads II from over at vB.org and was not able to replace the postid with the fileid they used. I think I might get bids on doing this over at Rent A Coder and then share it on vB.org with other... just to give back to the community a little.

      Thanks for the insight!

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      😀
      😂
      🥰
      😘
      🤢
      😎
      😞
      😡
      👍
      👎