PDA

View Full Version : vBa and Thread prefixes


9clics
10-01-2007, 11:41 AM
Hi all,

I'm using thread prefixes on my board, and I would like to know if it is possible to show prefixes on the recent posts block of vBa CMPS? (and how to do it, of course ;-) )

Thanks in advance for your help

Alex

Brian
10-01-2007, 02:15 PM
First you would need to add a new plugin to the 'vba_cmps_module_recthreads_start' location with the following PHP code:
$rthread_fields .= ', thread.threadprefix';

Then you should be able to edit the 'adv_portal_recthreads_{exp/lean}' templates and add the variable $thread[threadprefix] where you would like the prefix to appear.

Our Sponsors
 

9clics
10-02-2007, 11:07 AM
Sorry brian,

But where is the vba_cmps_module_recthreads_start location?

Best Regards,

Alex

towermatt
10-02-2007, 12:15 PM
That would be in your style manager under styles and templates.

Our Sponsors
 

9clics
10-02-2007, 12:22 PM
Hello,

I can find the adv_portal_recthreads_exp template, but vba_cmps_module_recthreads_start is not there... Are you sure that it is not a php file to edit somewhere on the server?

Tom M
10-02-2007, 01:06 PM
That is a plugin hook location. The code Brian posted needs to be put in a plugin with that specified as the location.

towermatt
10-02-2007, 02:17 PM
Ooops--I knew I should have stayed out of that one. LOL

9clics
10-02-2007, 02:20 PM
Sorry guys, i'm completely new to vba ;-)

Lionel
10-02-2007, 02:28 PM
You need to consult vbulletin's documentation at http://www.vbulletin.com on how to add a plugin.

9clics
10-02-2007, 02:49 PM
Thx lionel !

9clics
10-02-2007, 03:14 PM
Hi again guys,

So it works perfectly, I almost understood what I've done, but I have one last question : how $mods[colspan] is calculated ? (and for my particular problem, the header of recent posts table has : colspan = number of columns - 1, because I've added prefixes into this table)

thx

Brian
10-03-2007, 01:50 PM
If you edit one of your modules through the Admin CP, you should see a setting called 'Title Row Colspan'. That's what controlls the $mods[colspan] variable.

9clics
10-03-2007, 05:14 PM
Thanks Brian !

9clics
10-03-2007, 06:33 PM
So, I've changed the Title Row Colspan setting for recent thread module (to 6), but nothing has changed on my portal page the colspan attribute value is always 5... how is it possible?

Brian
10-04-2007, 12:33 PM
Sorry, I wasn't thinking about the fact that the colspan is generated dynamically for the recent threads module. If you add a plugin to the 'vba_cmps_module_recthreads_start' hook location with the following code, then it should do the trick.
$mods['colspan'] += 1;
Note that you can adjust the 1 there to the number of columns you need added if it's more than 1.

9clics
10-04-2007, 03:14 PM
Thanks a lot Brian, I will try that in a few minutes ;-)

9clics
10-04-2007, 06:56 PM
Brian, thanks a lot, it works very well like that !

Grazu
11-14-2007, 04:37 PM
Sorry to be a real dummy, but I cannot figure out to fix this: showing thread prefixes on the recent posts on Vba 3.0 RC2... The posts above do not help me as I can't find 'vba_cmps_module_recthreads_start'...

Who could help step by step please? I could then make a french translation for a lot of other users.
Many thanks in advance

ScooterGT.net

Grazu
11-15-2007, 01:21 PM
@9clics, could you please help me?
I'm as lost as you where 6 months ago...

Brian
11-16-2007, 01:33 PM
The posts above do not help me as I can't find 'vba_cmps_module_recthreads_start'...


Admin CP => Plugins & Products => Add New Plugin - Go there, select 'vba_cmps_module_recthreads_start' from the 'Hook Location' select box, and then add the code from the post above to the 'Plugin PHP code' area.

Grazu
11-16-2007, 03:07 PM
A million Thanks!
This now works like a charm :)

www.ScooterGT.net