Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2011, 04:57 PM
MrHorror MrHorror is offline
 
Join Date: Nov 2010
Posts: 277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default I Need the second version of a mod for vb 3.8.6

Using this code as an uploaded XML....

Code:
require_once('./includes/functions_user.php');
        $userid = $thread['postuserid'];
        $username = $thread['postusername'];
        $avatarurl = fetch_avatar_url($userid);
        if ($avatarurl == '') {
          $avatar = "<div class='avatar_forumdisplay' style='float:$stylevar[left]'><a href='member.php?u=$userid'><img src='$stylevar[imgdir_misc]/aucun_avatar.gif' border='0' width='40' height='40' alt='Profil de $username'></a></div>";
        }
        else {
          $avatar = "<div class='avatar_forumdisplay' style='float:$stylevar[left]'><a href='member.php?u=$userid'><img src='image.php?u=$userid' border='0' width='40' height='40' alt='Avatar $username'></a></div>";
        }



and then by placing this bit of code...

Code:
.avatar_forumdisplay {
padding:0px 5px 0px 0px;
}
into additional CSS...and then by finding this bit of html:

HTML Code:
<if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&t=$thread[threadid]" id="thread_gotonew_$thread[realthreadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>
and adding $avatar to it...you can make avatars appear next to threads. As shown in this photo:







What I need help with, is for someone to take the xml, and edit it so along with avatars next to threads on forum display, it can also show avatars next to threads on forum home. As shown in the below photo...









I'd appreciate it if someone could do this for me?
Reply With Quote
  #2  
Old 06-16-2011, 07:59 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK I made a plugin that will display the avatar on your FORUMHOME template.

This is a PLUGIN not a product, you upload the plugin into vbulletin as opposed to install a product.

Also you need to manually edit your forumhome_forumbit_level2_post template.

Add the phrase: $avatar anywhere in the template. You can figure out where it looks best for you... use HTML to position it where you want.

Plugin attached.

If I have the time I will make it into an install-able product. If anyone else wants to try they are free to use this code.

This will probably only work if your avatars are stored in the database. If the "Avatar on forumdisplay" plugin works for you, so will this.
Attached Files
File Type: xml avatar_forumhome-plugins.xml (1.1 KB, 4 views)
Reply With Quote
  #3  
Old 06-16-2011, 08:34 PM
MrHorror MrHorror is offline
 
Join Date: Nov 2010
Posts: 277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
OK I made a plugin that will display the avatar on your FORUMHOME template.

This is a PLUGIN not a product, you upload the plugin into vbulletin as opposed to install a product.

Also you need to manually edit your forumhome_forumbit_level2_post template.

Add the phrase: $avatar anywhere in the template. You can figure out where it looks best for you... use HTML to position it where you want.

Plugin attached.

If I have the time I will make it into an install-able product. If anyone else wants to try they are free to use this code.

This will probably only work if your avatars are stored in the database. If the "Avatar on forumdisplay" plugin works for you, so will this.


Thanks for the try. But I uploaded the product, and instead got a database error. So I uninstalled.
Reply With Quote
  #4  
Old 06-16-2011, 11:12 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's weird... can you give me a copy of the database error so I can check it out? It's working on my test forum.
Attached Images
File Type: jpg foromhome_av_test.jpg (179.0 KB, 0 views)
Reply With Quote
  #5  
Old 06-17-2011, 11:13 PM
MrHorror MrHorror is offline
 
Join Date: Nov 2010
Posts: 277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's the database error I keep getting. Sent you a PM also.



Database error in vBulletin 3.8.6:

Invalid SQL:

SELECT user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(customavatar.userid) AS hascustom, customavatar.dateline,
customavatar.width, customavatar.height, customavatar.width_thumb, customavatar.height_thumb
FROM user AS user
LEFT JOIN avatar AS avatar ON avatar.avatarid = user.avatarid
LEFT JOIN customavatar AS customavatar ON customavatar.userid = user.userid
WHERE user.userid =;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6
Error Number : 1064
Request Date : Saturday, June 18th 2011 @ 03:09:55 AM
Error Date : Saturday, June 18th 2011 @ 03:09:55 AM
Script : http://hmandsforums.oliwy.net/forums/
Referrer :
IP Address : 72.80.233.138
Username : Mr.Horror
Classname : vB_Database
MySQL Version : 5.1.52
Reply With Quote
  #6  
Old 06-17-2011, 11:21 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm... Ok I have an idea what it might be, it's not getting any data from the SQL Query I wrote in it... I'm not sure why but I think if I re-write it to use the built in VB database functions it may work.

Give me some time with this.
Reply With Quote
  #7  
Old 06-18-2011, 12:25 AM
MrHorror MrHorror is offline
 
Join Date: Nov 2010
Posts: 277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure thing brother.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:19 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06009 seconds
  • Memory Usage 2,249KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (2)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete