Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Content first, SEO friendly theme
sjeeps
✭
I'm currently working on a new theme for Vanilla and I was wondering about how to get started making the content load first and then the side panel. Also I was searching in the theme folder for this " < " and this " > " which is the arrow for the next or previous page, I want to replace it with an image. I would appreciate any help with that, thanks.
0
This discussion has been closed.
Comments
$Configuration['CONTROL_POSITION_PANEL'] = '600'; $Configuration['CONTROL_POSITION_NOTICES'] = '300'; $Configuration['CONTROL_POSITION_BODY_ITEM'] = '400';
As far as the paging... that is built in library/framework/Framework.Class.PageList.php... and it appears it already has a built-in method of overriding those... paste this also in settings.php:
$Configuration['PAGELIST_NUMERIC_TEXT'] = '1'; $Context->SetDefinition('PagelistNextText', '<img src="Next.png" alt="Next" />'); $Context->SetDefinition('PagelistPreviousText', '<img src="Previous.png" alt="Previous" />' );
$Context->Dictionary['PageListNextText'] = '<img src="Next.png" alt="Next" />'; $Context->Dictionary['PagelistPreviousText'] = '<img src="Previous.png" alt="Previous" />'
$Context->Dictionary['PagelistNextText'] = 'Next'; $Context->Dictionary['PagelistPreviousText'] = 'Prev';
in my definitions file, but i am getting the arrows. what is the best way of over riding them?
Could someone share some lights on this? I would like my main content show up in "say google.." before sidebar content.
Cheers.
In conf/settings:
$Configuration['CONTROL_POSITION_BODY_ITEM'] = '300'; $Configuration['CONTROL_POSITION_PANEL'] = '400';
In menu.php:
<?php // Note: This file is included from the library/Vanilla/Vanilla.Control.Menu.php class. // REMOVED SESSION DIV-MOD BY SAM EL $this->CallDelegate('PreHeadRender'); echo '<div id="HeaderWrap"> <a name="pgtop"></a> <div id="Title"> </div> <div id="sub"> '.$this->Context->Configuration['BANNER_TITLE'].' </div> <ul>'; while (list($Key, $Tab) = each($this->Tabs)) { echo '<li'.$this->TabClass($this->CurrentTab, $Tab['Value']).'><a href="'.$Tab['Url'].'" '.$Tab['Attributes'].'>'.$Tab['Text'].'</a></li>'; } echo '</ul> </div></div>'; //END HEADERWRAP AND HEADER MOD BY SAM EL $this->CallDelegate('PreBodyRender'); //START CONTAINER AND RIGHT CONTENT-MOD BY SAM EL echo '<div id="Container"> <div id="Content">'; ?>
In panel.php:
<?php // Note: This file is included from the library/Framework/Framework.Control.Panel.php class. // END RIGHT CONTENT AND START LEFT PANEL MOD BY SAM EL echo '</div><div id="Panel">'; // START SIGNED IN MOD BY SAM EL echo '<div id="SignIn">'; if ($this->Context->Session->UserID > 0) { echo str_replace('//1', $this->Context->Session->User->Name, $this->Context->GetDefinition('SignedInAsX')).' [<a href="'.$this->Context->Configuration['SIGNOUT_URL'].'">'.$this->Context->GetDefinition('SignOut').'</a>]'; } else { echo $this->Context->GetDefinition('NotSignedIn').' [<a href="'.AppendUrlParameters($this->Context->Configuration['SIGNIN_URL'], 'ReturnUrl='.GetRequestUri()).'">'.$this->Context->GetDefinition('SignIn').'</a>]'; } echo '</div>'; // Add the start button to the panel if ($this->Context->Session->UserID > 0 && $this->Context->Session->User->Permission('PERMISSION_START_DISCUSSION')) { $CategoryID = ForceIncomingInt('CategoryID', 0); if ($CategoryID == 0) $CategoryID = ''; echo '<div class="StartNew"><a href="'.GetUrl($this->Context->Configuration, 'post.php', 'category/', 'CategoryID', $CategoryID).'">' .$this->Context->GetDefinition('StartANewDiscussion') .'</a></div>'; } $this->CallDelegate('PostStartButtonRender'); while (list($Key, $PanelElement) = each($this->PanelElements)) { $Type = $PanelElement['Type']; $Key = $PanelElement['Key']; if ($Type == 'List') { $sReturn = ''; $Links = $this->Lists[$Key]; if (count($Links) > 0) { ksort($Links); $sReturn .= '<ul> <li> <div class="Headings">'.$Key.'</div> <ul>'; while (list($LinkKey, $Link) = each($Links)) { $sReturn .= '<li> <a '.($Link['Link'] != '' ? 'href="'.$Link['Link'].'"' : '').' '.$Link['LinkAttributes'].'>' .$Link['Item']; if ($Link['Suffix'] != '') $sReturn .= ' <span>'.$this->Context->GetDefinition($Link['Suffix']).'</span>'; $sReturn .= '</a>'; $sReturn .= '</li>'; } $sReturn .= '</ul> </li> </ul>'; } echo $sReturn; } elseif ($Type == 'String') { echo $this->Strings[$Key]; } } $this->CallDelegate('PostElementsRender'); echo '</div>'; ?>