Announcement

Collapse
No announcement yet.

Add reputation for images in Albums?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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).

  • #2
    Originally posted by mobosix View Post
    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

    TalkNewsUK - My vBulletin 5.6.3 Demo
    AdminAmmo - My Cloud Demo

    Comment


    • #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...
      X