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

edited January 2008 in Vanilla 1.0 Help
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.


  • To change the positioning, paste this into conf/settings.php:$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" />' );
  • sjeepssjeeps
    edited April 2007
    Thank you, I think the code above works fine but I guess I need to do more work on the css file. Also when trying to override the next and previous arrows, I get this error: Call to a member function SetDefinition() on a non-object in /home/xxxx/public_html/Vanilla/conf/settings.php on line 37
  • Oh, instead of setdefinitions use
    $Context->Dictionary['PageListNextText'] = '<img src="Next.png" alt="Next" />'; $Context->Dictionary['PagelistPreviousText'] = '<img src="Previous.png" alt="Previous" />'
  • there is already $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?
  • (for now, i've changed it in the framework.class.pagelist file, but there should be an easier way, i'm sure)
  • I would like to solve this matter for SEO reasons as well. My forum pages are indexed in search engines, and the content in sidebar(panel) shows up before main content..

    Could someone share some lights on this? I would like my main content show up in "say google.." before sidebar content.

  • My current site Vent Swap is my first attempt to get the content to load first then the side panel. But to get this done, I had to alter many theme's files...
  • edited January 2008
    Nice.. bummer that it's hard to do in vanilla. Maybe easy for advanced users but it is difficult to change for normal users like myself who can do the same in vbulletin easily. Would you like to share what you did with the theme files?
  • I'm working on a new theme, I'll do some changes to make the content load first and I'll release it soon so stay tuned.
  • That's very kind of you. :) I'm actually using a different theme but similar based on vanilla. it would be nice if you could tell me some necessary changes. cheers.
  • sjeepssjeeps
    edited January 2008
    I'm not sure how this's going to work with your theme but here's what I've so far:

    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">&nbsp;</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>'; ?>
This discussion has been closed.