Forums
| e107 Themes.Net - Free e107themes, plugins and more. :: Forums :: Critiques Lounge :: Comments and Critiques |
|
<< Previous thread | Next thread >> |
| How to show Banner above Downloads like Arun ? | ||
|
Moderators: Arun
|
| Author | Post | ||
| Farasy |
| ||
![]() Registered Member #270 Joined: Fri Mar 24 2006, 01:46PMPosts: 4 | Hi Arun, thanks for your Mail. But i haven't understand it. Where i have to put in the code ? In which theme.php ? From my used Theme ? Please show me detailed. Regard s, Farasy
| ||
| Back to top | | ||
| brandi |
| ||
![]() Registered Member #34 Joined: Sun Sep 18 2005, 10:41AMPosts: 6 | Hi Farasy, i'm not Arun but I think i'm able to explain you how to do it I myself learned it from the master You'll need to make a $CUSTOMHEADER[' news'] = " //theme header-code here " $CUSTOMFOOTER[' news'] = " //theme footer-code here " $CUSTOMPAGES[' news'] = " // the pages that your CUSTOMTHEME shall be active (In your case download.php)"; I'll give you an example how i've done it myself with a welcomemessage - its the same concept you'll use with the banner above content thing at download page <?php // [multilanguage] - Determines wich Language file to be loaded for the theme in accordance with e107 core Language Prefernce setting. if(file_ exists(e_THEME." laidback/ languages/" .e_LANGUAGE." .php")){ // If you are changing the theme folder name - require_once(e_T HEME."laidback/ languages/" .e_LANGUAGE." .php"); // make sure to reflect the changes here also. }else{ require_once(e_T HEME."laidback/ languages/ English.php"); } if(!defined(" e_THEME")){ exit; } // [theme] $themename = "laidback"; $themeversion = "1.0"; $themeauthor = "Henrik Brandi"; $themedate = "11/12/2005"; $themeinfo = "I Started this theme, doing a template, and did some changes - I really like the result ";
$xhtmlcompliant = TRUE; // Tells e107 that this theme is valid xhtml $csscomplia nt = TRUE; // Tells e107 that this theme uses valid CSS //[theme settings] define(" STANDARDS_MODE", TRUE); // Asks Internet Explorer to enter standard mode define(" IMODE", "lite"); // Tells the theme to use light icon sets from e107_images/ generic directory. define(" THEME_DISCLAIMER" , "<br /><i>" .LAN_THEME_1."</ i>"); // This is theme disclaimer define ("CBWIDTH", "130px"); // Defines the width of Chatbox TextArea if(! defined("e_THEME" )){ exit; } // Not sure about this setting $page=sub str(strrchr($_SER VER['PHP_SELF'], "/"), 1); define(" e_PAGE", $page); // Not sure about this setting // [layout] $layout = "_default"; $HEADER = " <div id='body'> <div id='wrapper'> <div id='page'><!-- Start Page --> <div id=' headerwrapper'><! -- Start HeaderWrap --> <div id='header'><!-- Start Header --> <div id='navbar'><!-- Start NavBar --> {SITELINKS=flat} </div><!-- End NavBar --> </div><!-- End Header --> </div><!-- End HeaderWrap --> <div id=' contentwrapper' ><!-- Start ContentWrap --> <div id='menubar'><!-- Start MenuBar --> {MENU=1} </div><!-- End Menubar --> <div id='contentarea' ><!-- Start ContentArea --> "; $FOOTER = " </div><!-- End ContentArea --> <div id=' footer_wrapper'> <!-- Start Footer_wrapper --> <div id='footer'><!-- Start Footer --> </div><!-- End Footer --> <div class=' disclaimer' style='text- align: center;' > {SITEDISCLAIM ER}<br / >{THEMEDISCLAIMER } </div> </div><!-- End Footer_wrapper --> </div><!-- End ContentWrap --> </div><!-- End Page --> </div> </ div> "; $CUSTOMHEADER[' news'] = " <div id='body'> <div id='wrapper'> <div id='page'><!-- Start Page --> <div id=' headerwrapper'><! -- Start HeaderWrap --> <div id='header'><!-- Start Header --> <div id='navbar'><!-- Start NavBar --> {SITELINKS=flat} </div><!-- End NavBar --> </div><!-- End Header --> </div><!-- End HeaderWrap --> <div id=' contentwrapper' ><!-- Start ContentWrap --> <div id='menubar'><!-- Start MenuBar --> {MENU=1} </div><!-- End Menubar --> <div id='contentarea' ><!-- Start ContentArea --> <div id='welcome' > {WMESSAGE} </div> "; $CUSTOMFOOTER[' news'] = " </div><!-- End ContentArea --> <div id=' footer_wrapper'> <!-- Start Footer_wrapper --> <div id='footer'><!-- Start Footer --> </div><!-- End Footer --> <div class=' disclaimer' style='text- align: center;' > {SITEDISCLAIM ER}<br / >{THEMEDISCLAIMER } </div> </div><!-- End Footer_wrapper --> </div><!-- End ContentWrap --> </div><!-- End Page --> </div> </ div> "; $CUSTOMPAGES[' news'] = "news.php"; //[newsstyle] - This Mrkup (XHTML) determines as how your newses renders. $NEWSSTY LE = " <h2> {STICKY_ICO N} {NEWSTITLE} </ h2> <div class='newsbody' > {NEWSBODY} {EXTENDED} <div style='text- align:right' class=' newsfootertext' > </div> </ div> <br />"; define(" ICONSTYLE", "float: left; border:0"); define(" COMMENTLINK", LAN_THEME_3); define(" COMMENTOFFSTRING" , LAN_THEME_2); define(" PRE_EXTENDEDSTRIN G", "<br /><br /> "); define(" EXTENDEDSTRING", LAN_THEME_4); define(" POST_EXTENDEDSTRI NG", " <br />"); define(" TRACKBACKSTRING", LAN_THEME_5); define(" TRACKBACKBEFOREST RING", " | "); // [linkstyle] - Controls the main links define(' PRELINK', ""); define(' POSTLINK', ""); define(' LINKSTART', "  "); define(" LINKSTART_HILITE" , "  "); define('LINKEND' , " "); define(' LINKDISPLAY', 1); define(' LINKALIGN', "left"); define(' LINKCLASS', ""); // [tablestyle] - This Markup (XHTML) renders your menu's News Categories etc. function tablestyle($capti on, $text, $mode) { //echo "<span style='color: red;'>Mode: $mode</span>"; echo "<h2>{$caption}</ h2>\n <div style='font-size: 85%; '>{$text}</div> <br />\n"; } // [comment style] - Markup for comments section rendering. $COMME NTSTYLE = " <table style='width: 445px;'> <tr> <td style='width: 30%; vertical-align: top;'><span class=' mediumtext' >{USERNAME}</ span><br /><span class='smalltext' >{TIMEDATE}</ span><br />{AVATAR}{REPLY} </td> <td style='width: 70%; vertical-align: top;'><span class=' commenttext' >{COMMENT}</ span></td> </ tr> </table> <br /><br /> "; // [chatbox style] - Markup for chatbox rendering. $CHATB OXSTYLE = " <img src='".THEME." images/ chat_bullet.png' alt='' style='vertical- align: middle;' /> <span class='chatuser' > {USERNAME} </ span> <div class=' chatmessage' > {MESSAGE} </ div> <br />"; ?> | ||
| Back to top |
| ||
| Arun |
| ||
Arun![]() ![]() Registered Member #1 Joined: Fri May 20 2005, 04:11PMLocation: Kerala, India Posts: 70 | Ofcourse you have to make the changes in the 'theme.php' of the theme you are using currently. See Farasy, Brandi has given you a detailed description, and the same concept/idea is used in the case of Adsense banners too. If you still have doubt let me know which theme you are using and I'll tell you how to make the change. Or in other case you can paste the code of the theme.php here and I will make the modifications as needed. Give us the link to your site atleast. Arun | ||
| Back to top |
| ||
| Farasy |
| ||
![]() Registered Member #270 Joined: Fri Mar 24 2006, 01:46PMPosts: 4 | Thanky to you guys. I will try first. If don't work i will give you the theme.php. Link to my Site: link: | ||
| Back to top | | ||
| Farasy |
| ||
![]() Registered Member #270 Joined: Fri Mar 24 2006, 01:46PMPosts: 4 | I think im not able to do this. Don't know why. maybe time is less. I will give you the code of my theme.php and Link to the Banner i will show: Code: <? php /* +--------- ----------------- ----------------- ----------------- ---+ | e107 website system | | ©WIlliam Moffett 2001-2005 | link: | que@e107.net | | Released under the terms and conditions of the | GNU General Public License (http://gnu.org) . +-------------- ----------------- ----------------- --------------- + */ // [multilanguage] include_lan(e_TH EME."stanch/ languages/" .e_LANGUAGE." .php"); if(! defined("e_THEME" )){ exit; } // [theme] $themename = "stanch"; $themeversion = "0.1"; $themeauthor = "que"; $themeemail = "que@e107.net"; $themewebsite = "http:// e107themes.org"; $themedate = "10/15/05"; $themeinfo = "Stanch by Que, based on the nucleus cms theme by Ivan Fong aka <a href='http:// www.stanch.net/' >Stanch</a>"; define(" STANDARDS_MODE", TRUE); $xhtmlcompliant = TRUE; $csscompliant = TRUE; define(" IMODE", "lite"); define(" THEME_DISCLAIMER" , "<br /><i>" .LAN_THEME_1."</ i>"); if(! defined("e_THEME" )){ exit; } $page=substr(str rchr($_SERVER[' PHP_SELF'], "/"), 1); define(" e_PAGE", $page); $register_sc[] ='DL'; // [layout] $layout = "_default"; $HEADER = "<div id='wrapper' > <div id='header' > <div id='logo'>{}</ div> <h1 id=''> </ h1> <h2 id=''> </ h2> </ div> <table style='width: 100%;' cellpadding='0' cellspacing='0' > <tr> <td id='blank'></ td> <td id='leftcontent' > {DL} {SETSTYLE=side bar} {MENU=1} {MENU=2} </ td> <td id=' centercontent' > {SETSTYLE=def ault} <div id='banner' > </div>"; $FOOTER = " </td> </ tr> </ table> <div id='footer' > <div id='copyrights' > {SITEDISCLAI MER}<br / >{THEMEDISCLAIMER } </div> <div id='extrainfo' > <img src='".e_IMAGE." generic/php- small-trans- light.gif' alt='' /> <img src='".e_IMAGE." button.png' alt='' /> <img src='".e_IMAGE." generic/ poweredbymysql- 88.png' alt='' /> <a href='http:// validator.w3.org/ check? uri=referer' rel='external' ><img src='".e_IMAGE." generic/valid- xhtml11.png' alt='' style='border: 0;' /></a> <a href='http:// jigsaw.w3.org/ css-validator/ check/referer' rel='external' ><img src='".e_IMAGE." generic/vcss.png' alt='' style='border: 0;' /></a> </ div> </div> </ div>"; // [newsstyle] function news_style($news) { global $pref; $mydate = strftime("%d/%m :", $news[' news_datestamp']) ; $NEWSSTYLE = "<div class='content' > <div class=' contenttitle' ><h2>$mydate {NEWSTITLE} </ h2></div> <div class=' contentitem' > <div class=' contentitem1' ><small class=' contentitemcatego ry'>Category: {NEWSCATEGORY}</ small></ div> <div class=' contentitem2' ><small class=' contentitemposted by'>Posted by: {NEWSAUTHOR}</ small></ div> <div class=' contentitem3' ><small class=' contentitemcommen ts' >{NEWSCOMMENTS}</ small></div>" .( $pref[' trackbackEnabled' ] ? "<div class=' contentitem4' ><small class=' contentitemcommen ts'>{TRACKBACK}</ small></div>" : "")." </ div> <div class=' contentbody' > {STICKY_ICON} {NEWSICON} {NEWSBODY} {EXTENDED} </ div> </div>"; return $NEWSSTYLE; } / / [newsliststyle] $NEWSLISTSTYLE = ""; define(" ICONSTYLE", "float: left; border:0"); define(" COMMENTOFFSTRING" , LAN_THEME_2); define(" COMMENTLINK", LAN_THEME_3); define(" PRE_EXTENDEDSTRIN G", "<br /><br />[ "); define(" EXTENDEDSTRING", LAN_THEME_4); define(" POST_EXTENDEDSTRI NG", " ]<br />"); define(" TRACKBACKSTRING", LAN_THEME_5); define(" TRACKBACKBEFOREST RING", ""); // [linkstyle] define(" PRELINK", ""); // <div id='nav' > define(" POSTLINK", ""); // </div> define(" LINKSTART", ""); // <div class='sitelink' > define(" LINKSTART_HILITE" ,""); // <div class=' sitelinkon' > define(" LINKEND", ""); // </div> define(" LINKDISPLAY", ""); define(" LINKALIGN", ""); // left define(" LINKCLASS", ""); // linkclass define( " LINKCLASS_HILITE" , ""); // linkclasshilite // [tablestyle] function tablestyle($capti on, $text, $mode){ global $style; // echo "Style:".$style." Mode:".$mode; if($mode == "chatbox") { echo "<div class='sidebar' > <dl class='sidebardl' > <dt>{$caption}</ dt> <dd> {$text} </dd> </dl> </div>"; }else if($style == "sidebar") { echo "<div class='sidebar' > <dl class='sidebardl' > <dt>{$caption}</ dt> <dd class='ddnorm' onmouseover=\" eover(this, 'ddiehover')\" onmouseout=\" eover(this, 'ddnorm')\"> {$text} </dd> </dl> </div>"; }else{ echo "<h2 style='text- align:center;' >{$caption}</ h2> <div class='bodytable' >{$text}</div>"; } } // [commentstyle] $COMMENTSTYLE = "{USERNAME} @ <span class='smalltext' >{TIMEDATE}</ span><br /> {AVATAR}<span class='smalltext' >{REPLY}</ span><br /> {COMMENT} <div style='text- align: right;' class='smallext' >{IPADDRESS}</ div>"; // [chatboxstyle] $CHATBOXSTYLE = "<dt class=' chatauthor' onmouseover=\" eover(this, 'dtiehover')\" onmouseout=\" eover(this, 'dt')\" ><b>{USERNAME}</ b></dt> <dd class='ddnorm' onmouseover=\" eover(this, 'ddiehover')\" onmouseout=\" eover(this, 'ddnorm')\" > {MESSAGE} </ dd>"; ?> Code to Banner: link: Many ThX for your Help Arun and brandi. Regards, Farasy | ||
| Back to top | | ||
| brandi |
| ||
![]() Registered Member #34 Joined: Sun Sep 18 2005, 10:41AMPosts: 6 | As I can see, it is not a v7 theme, and therefore i am notsure if it is possible to use $CUSTOMPAGES... However wait and see - i'm not sure - maybe Arun know it? | ||
| Back to top |
| ||
| Farasy |
| ||
![]() Registered Member #270 Joined: Fri Mar 24 2006, 01:46PMPosts: 4 | brandi wrote ... As I can see, it is not a v7 theme, and therefore i am notsure if it is possible to use $CUSTOMPAGES... However wait and see - i'm not sure - maybe Arun know it? It is a V7 Theme. Stanch. MayBe Arun can help | ||
| Back to top | | ||
Powered by e107 Forum System









