The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Hello ,
I have template written in vb4 and i need to convert it to vb3 PHP Code:
|
#2
|
|||
|
|||
![]()
There is a problem - there is no replacement for vb:each in vb3. You would have to write a for loop in a plugin and build a string, then include the string in your template. Or if there is a limit to the number of keywords you might be able to do it with a series of <if> tags.
|
#3
|
||||
|
||||
![]()
yes after i read vbulletin syntax i see that ... vb:each for foreach loop but i can not put in plugin then rebulild it
So , can you help me more with that ? Or make modification edit and for pay ![]() |
#4
|
|||
|
|||
![]()
Where is your template used? Do you have php code that renders your template?
|
#5
|
||||
|
||||
![]()
thanks kh99 for reply .. this template used in this product https://vborg.vbsupport.ru/showthread.php?t=234192 ( FUZZY SEO Booster )
Which already built-in for vb4 But i try to install it on vb 3.8.5 and work fine in admincp and appear all data and also appear search terms and i can control for all setting BUT when i see three template which product used it i see them coded for vb4 so nothing data appear in forums pages an showthread page ( HERE THE PROBLEM ) |
#6
|
|||
|
|||
![]()
(oops...nvm, forgot you're trying to go back to vb3).
|
#7
|
||||
|
||||
![]()
nvm ... and thanks for keep care for my concern ...
Any idea and soultion for converted it to VB 3.8 ... Coder told it request only for converting temapaltes which i already write it in the first code ? |
#8
|
|||
|
|||
![]()
Well, OK - I would start with this:
Code:
<style type="text/css"> #seofq_list_cell *{background:none;display:inline;border:none;color:black;padding:0px 0px 0px 0px;-webkit-border-top-right-radius:0px;-webkit-border-top-left-radius:0px;-webkit-box-shadow: none;font-weight:normal;} #seofq_list_cell h2{font-size: 130%;font-weight: bold;} #seofq_list_cell h3{font-size: 120%;font-weight: bold;} #seofq_list_cell h4{font-size: 120%;} #seofq_list_cell h5{font-size: 110%;} #seofq_list_cell strong{font-size: 110%;} #seof_queries_list a.seoq{margin:0px 0px 0px 0px;font-size: 100%;} </style> <h4 class="threadinfohead"><span class="optiontitle">$vbphase[seofq_title]</span></h4> <div id="seof_queries_list" class="thread_info_block"> <div class="inner_block"> <div id='seofq_list_cell'>$feosq_keywords</div> </div> </div> I just changed {vb:rawphrase seofq_title} to $vbphase[seofq_title] and replaced the whole <vb:each>...</vb:each> section with $feosq_keywords, so you should be able to do the same thing to the other two templates. Now you just need to add a section of code in the plugin to create $feosq_keywords from the keyword array. To be honest there's something a little weird going on there with the '<' character so I'm not sure what was intended, which makes it difficult to give you the correct code. But I'll take a stab at it and say in the process_templates_complete plugin, find this section: Code:
$newTemplate = vB_Template::create( $plugin_template ); $newTemplate->register( 'keywords', $keywords ); $newTemplate->register( 'tagscount', (count($keywords)-1) ); $newTemplate->register( 'tag_fix', '<' ); $rendered = str_replace( "<", "<", $newTemplate->render() ); and replace it with this: Code:
$feosq_keywords = array(); foreach ($keywords AS $word) { $feosq_keywords[] = "<$word[tag]>$word[term_value]</$word[tag]>"; } $feosq_keywords = implode(' ', $feosq_keywords); eval('$rendered = "' . fetch_template($plugin_template) . '";'); I can see there are other changes that need to be made in the code, but if you're in contact with the mod author then maybe he can help you with those. |
#9
|
||||
|
||||
![]()
thanks ...
but this place ( process_templates_complete ) not founded in my vb 3.8.5 ![]() I think this location only founded in vb4 ?? and also i try to change plugin location to global start ot showthread star appear this error Fatal error: Class 'vB_Template' not found in /home/forums/public_html/forum/showthread.php(112) : eval()'d code on line 106 |
#10
|
|||
|
|||
![]()
Hmm...try process_templates instead. But like I said, I know there are still issues that need to be addressed, such as, there's still a call to vB_Template:
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|