The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Add prefix in code?
I have a code that grabs information from threads for a box on my portal, but it Can't grab prefixes which would be pretty important.
Could sombdy edit this code for me so it will include thread prefixes: Code:
<a href="$vboptions[bburl]/news.php?id=$thread[threadid]" $thread[prefix_plain_html] title="$thread[title]"><strong>$thread[title]</strong></a><br /> $dateposted<br /> Posted by <strong><a href="$vboptions[bburl]/member.php?u=$thread[postuserid]">$thread[postusername]</a></strong><br /> <font size="2" face="Times" color="#383838"> $message </font> <br /><br /> |
#2
|
||||
|
||||
You need to have grabbed the prefixid in your query for the threads. Then in the php (your plugin or page code):
PHP Code:
|
#3
|
|||
|
|||
Quote:
I don't know how to do a query and it's actually a template. |
#4
|
||||
|
||||
It could already be available for use - I don't know. You have this in the middle of your template that you posted above:
HTML Code:
$thread[prefix_plain_html] |
#5
|
|||
|
|||
Quote:
|
#6
|
||||
|
||||
But your code in post one is wrong. It's not going to show a thing.
|
#7
|
|||
|
|||
Quote:
Code:
<a href="$vboptions[bburl]/news.php?id=$thread[threadid]" title="$thread[title]"><strong>$thread[title]</strong></a><br /> $dateposted<br /> Posted by <strong><a href="$vboptions[bburl]/member.php?u=$thread[postuserid]">$thread[postusername]</a></strong><br /> <font size="2" face="Times" color="#383838"> $message </font> <br /><br /> |
#8
|
||||
|
||||
If it's available for use, it should show up with this code:
Code:
$thread[prefix_plain_html] <a href="$vboptions[bburl]/news.php?id=$thread[threadid]" title="$thread[title]"><strong>$thread[title]</strong></a><br /> $dateposted<br /> Posted by <strong><a href="$vboptions[bburl]/member.php?u=$thread[postuserid]">$thread[postusername]</a></strong><br /> <font size="2" face="Times" color="#383838"> $message </font> <br /><br /> |
#9
|
|||
|
|||
Quote:
What about the first code you posted, can I use that for anything? There really isn't a modification released for it because I payed fore it and the creator isn't around anymore. Any way a XML could be edited for this? |
#10
|
||||
|
||||
The code I posted is what I use in a modification I have for my site. I had to modify the query that grabs the threads and add the prefixid to the field list and then use that code to 'create' the prefix to be used in the template. You can probably edit your modification to do all this. Play with it on your test site - that's the best thing to do when you need to figure things out.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|