The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I'm trying on working on having a custom user avatar underneath the regular vbulletin avatar. The custom avatar is retrieved with a dynamic php script (getavatar.php?account=1) which is associated with each users forum id.
I was wondering what is the best way to insert this into the postbit template for each user. I know I can get the user id using $post[userid], I'm just now sure on how to include it. Any help is appreciated. |
#2
|
|||
|
|||
![]()
id use plugins. and just put your code in the plugin.
hooklocation: postbit_complete or something like that. (if you like having a file try...) PHP Code:
|
#3
|
|||
|
|||
![]()
so some like:
Code:
ob_start(); include('./getavatar.php?account=$post[userid]'); $getavatar = ob_get_contents(); ob_end_clean(); |
#4
|
|||
|
|||
![]()
oh
![]() ok, since this will be used many times (once per post), use PHP Code:
|
#5
|
|||
|
|||
![]()
I tried it in a plugin and it just spit out all of the php imaging code (weird characters, etc):
ÿÛ¸Ù&DPÃ"¸sÃ0¶eÓÛc|¢~Sô¬¡SnÒÐ x^:ʸnêÏåB¥]N<µë*ûúW~ç5Q@Q@Q@Q@Q@<45½\]Ý'ú£lôû/øû}kÜmȽf'þ=ã8Ç÷yî'D²Ó`P'ï# W K;Híã<"ã=ϽgV|Ò9=ÅÈAÚ±îo9çé PÜÝõæ±înúó^eJÇ|)ój3J¢å I tested the image in a post doing [img]getavatar.php?account=1[/img] which display fine. But if I try using a <img src="getavatar.php?account=$post[userid]"> in the postbit template, it doesn't allow it. Is there a setting to allow dynamic php images (files ending in ? or &) within a template? If use the <img src="getavatar.php?account=$post[userid]"> and view the source code, it correctly lists the <img src="getavatar.php?account=1">, but it doesn't display the image. |
#6
|
|||
|
|||
![]()
are your avatars and attachments stored as files or in the database?
|
#7
|
|||
|
|||
![]()
They are stored as files and are assigned in a seperate database/table:
userid | avatarurl I use the userid as a reference between the vbulletin user table and my customavatar database. I then create a php script which retrieves the userid and display the appropriate image: Example: If I use <img src="getavatar.php?account=1"> in a standard php document, it displays it perfectly. The problem comes as I stated in the previous post. Correctly shown in the source code, but not displayed. |
#8
|
|||
|
|||
![]()
ah, In the vBOptions > Message Posting and Editing Options > Allow Dynamic URL for [IMG] Tags
Try setting that to YES and see if it makes any difference |
#9
|
|||
|
|||
![]() Quote:
|
#10
|
|||
|
|||
![]()
hrm, that sounds prety odd. and makes little sence. because if [img] works, then so should <img>.i would just check to make sure everything is spelled right. if it still dosent work. View the source when you use [img] and compare it with <img>. Hope this helps
~Cody Woolaver |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|