The Arcive of vBulletin Modifications Site. |
|
How to Insert Version Number in Footer Details »»
|
|||||||||||||||||||||||||
I'm looking into using the version number from one of my projects in the footer. I can cope with phrasing, and know how to edit the template to add what I need, but I'm stuck on how to extract the number from PT that I need.
How can I collect the latest version number, and then add it as a variable to the template? Thanks for any help in advance... ![]() Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
You need to use a query like:
Code:
SELECT version FROM product WHERE productid = 'vbprojecttools'; |
|
#3
|
||||
|
||||
|
Thanks for the help. So far, I've been able to get this query to work:
Code:
$version = $db->query_first("
SELECT 'versioname'
FROM mytable_pt_projectversion
WHERE projectid = 2 AND projectversiongroupid = 1 AND displayorder = 10;
");
vB_Template::preRegister('footer',array('txuversion' => $version));
Am I missing something obvious? Thanks again for the help, I'm a total noobie when it comes to programming...
|
|
#4
|
||||
|
||||
|
Quote:
Code:
vB_Template::preRegister('footer',array('txuversion' => $version['versioname']));
|
|
#5
|
||||
|
||||
|
I got it working by doing this:
Code:
$version = $db->query_first("
SELECT versionname
FROM mytable_pt_projectversion
WHERE projectid = 2 AND projectversiongroupid = 1 AND displayorder = 10;
");
vB_Template::preRegister('footer',array('version' => $version['versionname']));
![]() Now just to select the right row... ![]() PS, thanks for the help
|
![]() |
|
|