The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
Use $bbuserinfo rather that $post. $post only works in the postbit I think.
|
#12
|
|||
|
|||
so like this
Code:
<if condition="$bbuserinfo[field17]"> <img src="$stylevar[imgdir_misc]/$bbuserinfo[field17].gif" alt="$bbuserinfo[field17]" /></if> Its not working |
#13
|
|||
|
|||
Try:
Code:
<if condition="$bbuserinfo['field17']"> <img src="$stylevar[imgdir_misc]/$bbuserinfo[field17].gif" alt="$bbuserinfo[field17]" /></if> |
#14
|
|||
|
|||
I tried it and it doesn't work either
|
#15
|
|||
|
|||
ok, where are you putting it, and what is happening?
|
#16
|
||||
|
||||
Yes, there is a way. There's a bunch of ways. xP It just depends on which you want to use.
The EASIEST way would be to create a plugin that will fetch user info for each thread displayed by the forum. BE ADVISED, though, that this will create an additional query for each thread loaded with the forum display. XD Not somethin' you want, probably. Next easiest would be to execute a custom query with a JOIN, something like SELECT thread.postuserid, userfield.field17 AS maritalstatus FROM thread, userfield WHERE thread.threadid IN (0,$ids) AND thread.postuserid=userfield.userid in the 'forumdisplay_query' hook. With the results assigned to an array $marital_status_array (as userid => maritalstatus), you could put <if condition="array_key_exists($thread[postuserid], $marital_status_array)">blahblahblah</if> in the threadbit template. If you're willing to go through that kind of work, tell me, and I'll post some step-by-step instructions. |
#17
|
|||
|
|||
I'm willing to go through with it, but can you make the instructions in layman terms :P it takes me a while to get things, but I'm willing to get it going.
--------------- Added [DATE]1246157167[/DATE] at [TIME]1246157167[/TIME] --------------- I was putting it in Forumdisplay where it was first told for me to place it, and nothing happen at all, it didn't show nothing what so ever. |
#18
|
||||
|
||||
All right, now, Melly. I'll make this simple on ye, but I STILL want you to try to understand the inner workings behind it, m'kay? That way, if vBulletin changes things around, you might have an idea what to do.
First thing's first. We'll use ONLY plugins for this, and no template edits or file edits. That way, if something does go wrong, all you have to do it turn off the plugin, kay? Good. We'll start by Creating a Product. Load up yer AdminCP, and scroll on down near the bottom. Expand Plugins & Products, and click on Product Manager. Scroll aaaallllllll the way to the bottom and click "Add/Import Product." For the Product ID, just enter "melmaritalthreads" or something. For the Title, put "Mel's Marital Status for Threads." For the version, we'll go with "0.01a". Description, "Some help that wonderful Sarteck using DragonBlade's account gave me!" Ignore the Product and Version Check URLs. Save it. Yay, you have a Product! Now to make some Plugins for the Product. Again, under Plugins & Products, click this time "Add New Plugin." For Product, select "Mel's Marital Status for Threads." (The only reason we added that Product, btw, was to organize the plugins. ) For the Hook location, select "forumdisplay_query". TECHIE NOTE: This is the "location" in the script where the plugin will execute. If you open up your "forumdisplay.php" file, find the line: PHP Code:
Now, for the title, enter "Marital Status Thread Query." Leave the execution order at default (5). Now for the important bit--the actual plugin code: PHP Code:
Leave "Plugin is Active" at no--you'll activate it in a moment. Save the plugin. All right! Next plugin will be used to display field17 next to each user's name (I'm assuming that's where you want it, right?). "Add New Plugin" again, select the Mel's Marital Status for Threads. Hook location is now 'threadbit_display'. (Also in the forumdisplay.php, a little further down, if you wanna glance at the PHP file.) Title this one "Marital Status Thread Display," because that's what this one will be doing--displaying the marital status. Leave the execution order at default, again (5). The code here is relatively simple--we're just going to append the Marital Status onto the end of the postusername value for the thread. :3 PHP Code:
Again, leave this off for now, and save it. Almost done! Now all we need to do is go to the Plugin manager, locate the two plugins we just made, and put checkmarks in the boxes to activate them both. Now go look at your forums, and see if everything went smoothly. If there's some errors, it's liekly a typo in my code somewhere. XP Just deactivate the plugins and tell me what the error is. If it works out, come back and tell me, too. :3 --------------- Added [DATE]1246227765[/DATE] at [TIME]1246227765[/TIME] --------------- Quote:
PHP Code:
PHP Code:
|
#19
|
|||
|
|||
Hey There just to introduce myself. I'm Mikey one of Mellies Techs for the site. I went ahead and did everything that you told her to do and we got an error.
here is actually a screenshot of that error. I deactivated the plugins for now. |
#20
|
|||
|
|||
I just wanted to verify that he is one of my techies...
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|