The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Okay... I've changed my code in this examples to be easier to read...
In VB3, the way I would do nested template callups would be as follows: Code:
while ($media = $vbulletin->db->fetch_array($recent_media))
{
eval('$recentbits .= "' . fetch_template('media_browsebit') . '";');
}
eval('print_output("' . fetch_template('media_browse') . '");');
Code:
while ($media = $vbulletin->db->fetch_array($recent_media))
{
$templater = vB_Template::create('media_browsebit');
$recentbits = $templater->render();
}
$templater->register('recentbits', $recentbits);
$templater = vB_Template::create('media_browse');
print_output($templater->render());
--------------- Added [DATE]1269768297[/DATE] at [TIME]1269768297[/TIME] --------------- Okay... nevermind, I found out what the problem was. The variable register needs to be AFTER the template creator. Simply fix... However, I am having another issue now. Inside "media_browsebit", I am trying to use certain classes that belong to the album css... Code:
<li>
<div class="albumthumbcontainer">
<a href="media.php?{vb:raw session.sessionurl}mediaid={vb:raw media.mediaid}"><img src="{vb:raw media.thumbnail}" border="0"></a>
</div>
<h3 class="albumtitle"><a href="media.php?{vb:raw session.sessionurl}mediaid={vb:raw media.mediaid}">{vb:raw media.title}</a></h3>
</li>
Code:
{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
<head>
{vb:raw headinclude}
<link rel="stylesheet" type="text/css" href="{vb:raw vbcsspath}album.css" />
<title>{vb:raw vboptions.bbtitle} - {vb:raw pagetitle}</title>
{vb:raw headinclude_bottom}
</head>
<body>
{vb:raw header}
{vb:raw navbar}
<div id="pagetitle">
<h1>{vb:raw pagetitle}</h1>
</div>
<div class="block" id="recentvideo">
<h2 class="blockhead">Recently Uploaded Media</h2>
<div class="blockbody floatcontainer">
<ul id="latestvideocontainer">
{vb:raw recentbits}
</ul>
</div>
</div>
{vb:raw footer}
</body>
</html>
It looks like "blockbody floatcontainer" isn't being called either... is that an album style? |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|