![]() |
Add prefix in code?
1 Attachment(s)
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 /> |
You need to have grabbed the prefixid in your query for the threads. Then in the php (your plugin or page code):
PHP Code:
|
Quote:
I don't know how to do a query and it's actually a template. |
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] |
Quote:
|
But your code in post one is wrong. It's not going to show a thing.
|
Quote:
Code:
<a href="$vboptions[bburl]/news.php?id=$thread[threadid]" title="$thread[title]"><strong>$thread[title]</strong></a><br /> |
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 /> |
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? |
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.
|
1 Attachment(s)
Well, if anybody could take a look I have the files in the attachments.
|
Try adding thread.prefixid to the two queries in the news.php page. And then just add this under there:
PHP Code:
|
Quote:
|
Is this a mod you purchased that you have exclusive rights to and can do what you want with (like posting it here)?
What about my directions don't make sense? I mean, I would like to be able to write stuff that people can understand and would love to know where I'm going wrong. |
Quote:
Sorry about that, well I just don't have much of experience with it... |
1 Attachment(s)
OK, I just had to make sure. I was suggesting the changes in the news.php file I've attached along with the change to the template posted above. Of course, I haven't tested it at all, so try it on your test site first. If you get an error, post the exact message.
|
Quote:
Would the changes have to be done to the module file? After all it's the module I use for the links. |
I am not familiar with modules at all. But, you would have to add the field to the rwc_newsarchive_bit template at least.
Oh, whoops! Change this (in there twice) "if ($latestthread['prefixid']) " to this "if ($thread['prefixid']) ". |
Quote:
|
They are lines in the news.php file. I forgot to change $latestthread to $thread.
|
Quote:
|
Reinstalled it? All you should do it reupload the file. If you reinstalled the xml file, then you probably wrote over the template changes you did.
What is in your "rwc_newsarchive_bit" template in the style you are using? And did you make the edit in two places in the news.php file? And what is in your "rwc_latestnews_bit" template? Both of those need the thread prefix added. If that isn't it, I don't know what else to suggest. |
Quote:
This is my template: Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> |
I don't know which template that is (you didn't say), but it doesn't have the thread prefix in it so it's not going to show one.
|
Quote:
|
Add either $thread[prefix_plain_html] or $thread[prefix_rich] where you want it to show before the thread title. If you want it to be bolded like the title, put it inside the <strong> tag with the title. If not, put it right before the <strong> tag.
|
Quote:
Is there any way I can work my way behind this? Or maybe I was just dumb (again) and need professional help, could you add it in the code right before the thread name? Code:
<a href="$vboptions[bburl]/news.php?id=$thread[threadid]" title="$thread[title]"><strong>$thread[title]</strong></a><br /> |
We already did it for that template here - https://vborg.vbsupport.ru/showpost....62&postcount=8
|
Quote:
|
But did you reapply the changes after you reimported the xml file and wrote over everything?
|
Quote:
|
All times are GMT. The time now is 03:50 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|