ORANGE-LT

Started by padexx, November 11, 2006, 07:40:42 AM

Previous topic - Next topic

ShopHRM

Quote from: M Nabil on December 31, 2006, 04:31:43 AM
Can somebody pleas help me ?

I want to add a Google leaderboard under the menu at the top of the forum; I've done it before with the default theme but the code here is different (I'm a total noob with PHP code). Can someone please tell me where exactly to place it.


I also would like to know the exact color code of the orange used in the forum titles.

Thanks,

The ad mod is the easiest way to get the banner on your site. here is the link to it  http://custom.simplemachines.org/mods/index.php?mod=255  as for the color code of the links look in the style.css and look for this

a {
   color: #F4B12C;
}

change the color to whatever you wish

M Nabil

Thanks very much ShopHRM ! will this ad mod work with Orange-LT theme without a problem ?
http://www.checkemall.co.nr/

Check your website's PR and Link Popularity in Google, Yahoo, and MSN

ShopHRM

Quote from: M Nabil on December 31, 2006, 10:19:34 AM
Thanks very much ShopHRM ! will this ad mod work with Orange-LT theme without a problem ?

I have it running on my site www.shophrm.com and havnt had a problem, I have smf 1.1 on there i dont know if it is compatable with 1.1.1. You will need to manually install for this theme like most mods but it works great

M Nabil

Quote from: ShopHRM on December 31, 2006, 05:24:47 PM
Quote from: M Nabil on December 31, 2006, 10:19:34 AM
Thanks very much ShopHRM ! will this ad mod work with Orange-LT theme without a problem ?

I have it running on my site www.shophrm.com and havnt had a problem, I have smf 1.1 on there i dont know if it is compatable with 1.1.1. You will need to manually install for this theme like most mods but it works great
So how do I manually install it. I installed it through the package manager and the ads refuse to display on orange-lt, they display on the default theme though. 
http://www.checkemall.co.nr/

Check your website's PR and Link Popularity in Google, Yahoo, and MSN

ShopHRM

#84
Have you ever installed a mod on a non default theme before? Its just like that. When you install a package through the package manager it installs it on the default theme and nothing else so you have to edit the files for your theme that did not get edited when the package was installed.

This is what you need to do

FTP into your site, go to the themes dir, go into the orange-lt theme   (remember to backup any file before you replace the files)
Do the following

download and open index.template.php


look for

<body>';

and add this after it

   
   //Display ads on the top of the page
   $ads = show_topofpageAds();   
   if(!empty($ads))
      if($ads['type']==0)
         echo $ads['content'];
      else
         eval($ads['content']);   
   unset($ads);



now look for this
                     </td>

add this after

';
                     //Welcome Ads
                     $ads = show_welcomeAds();
   
                     if(!empty($ads))
                     {
                        echo '<td class="windowbg2">';
                        if($ads['type']==0)
                           echo $ads['content'];
                        else
                           eval($ads['content']);
                        echo '</td>';
                     }
                     unset($ads);
                  echo '



look for this

   template_menu();


and add this after


   //Below the menu ads
   $ads = show_indexAds();   
   if(!empty($ads))
      if($ads['type']==0)
         echo $ads['content'];
      else
         eval($ads['content']);
   unset($ads);

   //Tower left Ads
   $ads = show_towerleftAds();
   if(!empty($ads))
      echo '<table><tr><td valign="top">', $ads['type']==0 ? $ads['content'] : eval($ads['content']) ,'</td><td width="100%" valign="top">';

   unset($ads);
   //Tower Right Ads
   $ads = show_towerrightAds();   
   if(!empty($ads))
      echo '<table><tr><td width="100%" valign="top">';
   unset($ads);   


look for this

   // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!]]>


add this before

   
   //Close table for towerright ads
   $ads = show_towerrightAds();   
   if(!empty($ads))
      echo '</td><td valign="top">', $ads['type']==0 ? $ads['content'] : eval($ads['content']) ,'</td></tr></table>';

   unset($ads);
   //Close table for towerleft ads
   $ads = show_towerleftAds();   
   if(!empty($ads))
      echo '</td></tr></table>';
   unset($ads);

   //Show ads on the bottom of the page
   $ads = show_bottomAds();
   if(!empty($ads))
      if($ads['type']==0)
         echo $ads['content'];
      else
         eval($ads['content']);
   unset($ads);

save the file and upload it back to your dir (backup original file first!)

now download and open  BoardIndex.template.php

look for

// Show some statistics next to the link tree if SP1 info is off.


add this before


   //Display ads on the board index
   $ads = show_boardAds();
   if(!empty($ads))
      if($ads['type']==0)
         echo $ads['content'];
      else
         eval($ads['content']);
   unset($ads);


save and upload that file

now download and open  Display.template.php

look for

global $context, $settings, $options, $txt, $scripturl, $modSettings;


add this after


   //Display ads on the thread page
   $ads = show_threadAds();   
   if(!empty($ads))
      if($ads['type']==0)
         echo $ads['content'];
      else
         eval($ads['content']);
   unset($ads);


now look for

   // Get all the messages...
   while ($message = $context['get_message']())
   {


and replace it with this

   //Ad Counter
   $adcounter =0;
   // Get all the messages...
   while ($message = $context['get_message']())
   {
      $adcounter++;


now look for

   </td></tr>';
   }

and replace it with

   </td></tr>';
   if ($adpost = show_posts($adcounter))
   {
      echo '

   <tr><td style="padding: 1px 1px 0 1px;">
      <table width="100%" cellpadding="3" cellspacing="0" border="0">
         <tr><td class="windowbg3">
            <table width="100%" cellpadding="5" cellspacing="0" style="table-layout: fixed;">
               <tr>
                  <td valign="top" width="16%" rowspan="2" style="overflow: hidden;">
                     <b>', $context['forum_name'], '</b>
                     <div class="smalltext">
                     </div>
                  </td>
                  <td valign="top" width="85%" height="100%">
                     <table width="100%" border="0"><tr>
                        <td valign="middle"><img src="', $message['icon_url'] . '" alt="" border="0" /></td>
                        <td valign="middle">
                           <div style="font-weight: bold;" id="subject_', $message['id'], '">
                              <a href="', $message['href'], '">', $message['subject'], '</a>
                           </div>
                           <div class="smalltext">« <b>', !empty($message['counter']) ? $txt[146] . ' #' . $message['counter'] : '', ' ', $txt[30], ':</b> ', $message['time'], ' »</div></td>
                        <td align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="bottom" height="20" style="font-size: smaller;">';
      if ($context['can_reply'] && !empty($options['display_quick_reply']))
         echo '
               ', $reply_button, '';

      // So... quick reply is off, but they *can* reply?
      elseif ($context['can_reply'])
         echo '
               ', $reply_button, '';

      // Can the user modify the contents of this post?
      if ($message['can_modify'])
         echo '
               ', $modify_button, '';

      // How about... even... remove it entirely?!
      if ($message['can_remove'])
         echo '
               ', $remove_button, '';

      // What about splitting it off the rest of the topic?
      if ($context['can_split'])
         echo '
               ', $split_button, '';
echo '
                        </td>
                     </tr></table>
                     <hr width="100%" size="1" class="hrcolor" />
                     <div class="post">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</div>
                  </td>
               </tr>
               <tr>
                  <td valign="bottom" class="smalltext" width="85%">
                     <table width="100%" border="0" style="table-layout: fixed;"><tr>
                        <td colspan="2" class="smalltext" width="100%">
                     </tr><tr>
                        <td valign="bottom" class="smalltext" id="modified_', $message['id'], '">
                        </td>
                        <td align="', !$context['right_to_left'] ? 'right' : 'left', '" valign="bottom" class="smalltext">
                           <img src="', $settings['images_url'], '/ip.gif" alt="" border="0" />&nbsp;', $txt[511], '
                        </td>
                     </tr></table>
               </tr>
            </table>
         </td></tr>
      </table>
   </td></tr>';
   }

   }

save and upload that file


now download and open    MessageIndex.template.php

look for

global $context, $settings, $options, $scripturl, $modSettings, $txt;


add this after


   //Display Ads on the Message index
   $ads = show_threadindexAds();
   if(!empty($ads))
      if($ads['type']==0)
         echo $ads['content'];
      else
         eval($ads['content']);
   unset($ads);


save and upload that file


that should be it, hope it works









Coon

When someone click the logo, it takes them to the home of the forum. How can I add a different URL when someone clicks the top logo. I want them to go to another site.

Also, is there any way to make two separate columns for the posts and threads?

ShopHRM

coon

to make it so the logo goes somewhere else go into the index.template.php and look for   

echo '<div id="logo"><a href="'.$scripturl.'" title=""></a></div>'; 

and put whatever url you want in there for example

echo '<div id="logo"><a href="http://www.yoururl.com"></a></div>';

padexx

THANKS ShopHRM for answering some questions while I was away! ;)

Any open problems to address?

Coon

panic, thanks... that worked!

Now, is there any way to make two separate columns for the posts and threads so that post and thread counts are not displayed in the same column?

Also, I changed the color code for the main menu buttons that are orange, but they still show up in that color. Do I have to change something else. Take a look at www.soccergrip.com/forum. It's still orange on the top.

M Nabil

ShopHRM,

Unfortunately, this does not work; for instance, there is no   <body>'; in  index.template.php. Also there are many of </td>, it's not one.

Is there another way to make it work or if not a way to add a google leaderboard under the menu without the ad mod ?
http://www.checkemall.co.nr/

Check your website's PR and Link Popularity in Google, Yahoo, and MSN

padexx

coon

this is because you forgot to change/delete the hover-image

#nav a:hover {
color: #eee;
background: #F4B12C url(images/hover-bg.png) 0 0 repeat-x;
}


Quotemake two separate columns for the posts and threads

you want

10335 Posts
445 Topics

look like this:
10335 Posts 445 Topics
?

M Nabil

Please panic,

how can I add a google leaderboard right under the menu that displays in every page ?

Thanks,
http://www.checkemall.co.nr/

Check your website's PR and Link Popularity in Google, Yahoo, and MSN

padexx

Nabil.

below

<div id="nav">
',template_menu(),'
</div>
</div>

add
<div align="center" style="margin:5px 0 5px 0;">YOUR AD CODE</div>

M Nabil

Thanks very much panic, btw ORANGE-LT theme is an awesome theme ! very professional!
http://www.checkemall.co.nr/

Check your website's PR and Link Popularity in Google, Yahoo, and MSN

Coon

Quote from: panic on January 03, 2007, 08:58:26 AM
you want

10335 Posts
445 Topics

look like this:
10335 Posts 445 Topics
?

Yes, exactly. :)

Mustafa Güngör

Is 1.1.1 version on its way?

padexx

Coon

boardindex.template.php

replace

<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">
', $board['posts'], ' ', $txt[21], ' <br />
', $board['topics'],' ', $txt[330], '
</span></td>

with

<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">
', $board['posts'], ' ', $txt[21], '
</span></td>
<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">
', $board['topics'],' ', $txt[330], '
</span></td>


and
<td colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">
with
<td colspan="4" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">

Mustafa Güngör

no theme changes needed! you can disable the theme version attention in admin - current theme

Coon

Thanks panic! Any way of getting 26629 to show up as 26,629? Also, is there a way to make it say Posts and Topics once on the top, as a subject line, and then just the numbers below that without the word posts or topics next to it? I like how the posts and views are displayed in the thread viewing section when you enter a forum.

MP

Using SMF 1.1.1

I really dig this theme, very clean and prof. looking!!

I changed the orange text to a navy blue and altered the text sizes a bit (gettin' old, the teeeeny fonts are too hard on my eyes). Otherwise using per original zip.

One thing is driving me nuts -- I've tried all the obvious settings, e.g. --

        [ ] Show latest member on board index

but cannot eliminate the --

        "... Latest Member: Username ..."

from displaying on the top of the page when logged in or the login screen (shown below highlighted in yellow).



Thoughts?

Thanks!
Everyone seems normal until you get to know them.

padexx

MP

this is "hard coded"

in the index.template.php of the theme remove
-
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
(at the bottom)

Coon

Quoteis there a way to make it say Posts and Topics once on the top

possible. needs more work. will take a look at the code next week...

Advertisement: