The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
CMS Articles Forum Block
My current code.
Code:
<vb:each from="articles" key="articleid" value="article"> <div class="article-block"> • <a href="{vb:raw article.url}"><b>{vb:raw article.title}</b></a> by {vb:raw article.lastposter} <div style="padding: 0px 0px 2px 14px;"><img src='images/literecords/misc/view-icon.png' alt='' class='inlineimg' /> {vb:raw article.replycount} comments</div></div> </vb:each> {vb:raw article.viewcount} {vb:raw viewcount} {vb:rawphrase article.viewcount} Any help? |
#2
|
||||
|
||||
This is template code for a forum block? What is the PHP code you are adding to the php block?
|
#3
|
||||
|
||||
Yeah this is the template code that is now the CMS forum block. I can get it to show the article.title and article.replycount but I can't find how to display the article.viewcount.
|
#4
|
||||
|
||||
I am still unclear on the php code you are using, but whatever it is, you need to make sure the variable is defined in there and then pre-registered for use in that template.
|
#5
|
||||
|
||||
This being said, how come the {vb:raw article.replycount}, {vb:raw article.url} and {vb:raw article.title} are working?
In the new forum block (cms_block) I am able to call the 3 above variables but not {vb:raw article.viewcount}. This is problem. I've not added any php code within the basic forum block form, I have edited the template itself and just enabled the new edited CMS forum block. |
#6
|
||||
|
||||
It's not defined in /includes/block/cmsarticles.php to be used in the template. You need to modify that code to be able to use that variable.
|
#7
|
||||
|
||||
Could you suggest how i could modify my code to be able to call that function from the articles template?
|
#8
|
||||
|
||||
Your code? So you do have some code you added?
If you are asking about the default vbulletin code, you just need to add a new variable for it around lines 188-200. If you use $row['something'] as your variable, you shouldn't have to register it. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|