Help with Mod

Need some coding help with a MOD or tweak you are working on? - Ask here.
Forum rules
Ask for support specifically regarding coding help with phpBB3.
Not for generic usability questions or support.

Help with Mod

Postby pallindrome » 08 Apr 2011, 06:59

Hello guys , I tried to install a simple mod i.e Google search mod on the forum. So the instructions are given only for prosilver theme. So my question is that won't it work on other themes like twilightbb ? And Even I tried to find the html codes given for prosilver theme in twilightbb theme , but can't find them. So will the mods work for only prosilver themes ?
And I'm a beginner in phpbb , so please help me out guys.
pallindrome
Cadet IV
Cadet IV
 
Posts: 49
Joined: 26 Mar 2011, 00:58
Gender: Male
phpBB Knowledge: 5


Re: Help with Mod

Postby spaceace » 08 Apr 2011, 07:53

twilightbb is based on subsilver2, so, in the mod you want to install, the template edits need to be done by opening the file subsilver2.xml if the mod you're talking about is this one http://www.phpbb.com/community/viewtopi ... &t=1659335
User avatar
spaceace
Supporter
Supporter
 
Posts: 263
Joined: 14 Feb 2008, 20:44
Location: Ontario, Canada
Gender: Male
phpBB Knowledge: 5

Re: Help with Mod

Postby pallindrome » 08 Apr 2011, 19:58

Yeah it is the same mod I was talking about, Will try your suggestion and reply.
pallindrome
Cadet IV
Cadet IV
 
Posts: 49
Joined: 26 Mar 2011, 00:58
Gender: Male
phpBB Knowledge: 5

Re: Help with Mod

Postby pallindrome » 08 Apr 2011, 20:07

Nopes not working at all I can't find the code line in twilightbb theme's Overall_Header.html file :( I even tried subsilver's code not working. Cannot find this line in the twilightbb theme overall_hearder.html file :
Code: Select all
<td width="100%" align="center"><h1>{SITENAME}</h1><span class="gen">{SITE_DESCRIPTION}</span></td>


But it is found in subsilver2
Last edited by pallindrome on 08 Apr 2011, 20:24, edited 1 time in total.
pallindrome
Cadet IV
Cadet IV
 
Posts: 49
Joined: 26 Mar 2011, 00:58
Gender: Male
phpBB Knowledge: 5

Re: Help with Mod

Postby Sniper_E » 08 Apr 2011, 20:23

What does the subsilver2 instructions tell you to find and add after???
Show your overall_header codes. So we don't have to download all that and look.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6979
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: Help with Mod

Postby pallindrome » 08 Apr 2011, 20:25

Cannot find this line in the twilightbb theme overall_hearder.html file :
Code: Select all
<td width="100%" align="center"><h1>{SITENAME}</h1><span class="gen">{SITE_DESCRIPTION}</span></td>

But it is found in subsilver2
pallindrome
Cadet IV
Cadet IV
 
Posts: 49
Joined: 26 Mar 2011, 00:58
Gender: Male
phpBB Knowledge: 5

Re: Help with Mod

Postby pallindrome » 08 Apr 2011, 20:34

This is my twillightbb overall_header.html

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
<!-- IF S_ENABLE_FEEDS -->
   <!-- IF S_ENABLE_FEEDS_OVERALL --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {SITENAME}" href="{U_FEED}" /><!-- ENDIF -->
   <!-- IF S_ENABLE_FEEDS_NEWS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_NEWS}" href="{U_FEED}?mode=news" /><!-- ENDIF -->
   <!-- IF S_ENABLE_FEEDS_FORUMS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_ALL_FORUMS}" href="{U_FEED}?mode=forums" /><!-- ENDIF -->
   <!-- IF S_ENABLE_FEEDS_TOPICS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_NEW}" href="{U_FEED}?mode=topics" /><!-- ENDIF -->
   <!-- IF S_ENABLE_FEEDS_TOPICS_ACTIVE --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_ACTIVE}" href="{U_FEED}?mode=topics_active" /><!-- ENDIF -->
   <!-- IF S_ENABLE_FEEDS_FORUM and S_FORUM_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FORUM} - {FORUM_NAME}" href="{U_FEED}?f={S_FORUM_ID}" /><!-- ENDIF -->
   <!-- IF S_ENABLE_FEEDS_TOPIC and S_TOPIC_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{U_FEED}?f={S_FORUM_ID}&amp;t={S_TOPIC_ID}" /><!-- ENDIF -->
<!-- ENDIF -->

<!--
   phpBB style name: twilightBB
   Based on style:   subsilver2
   Original author:  Tom Beddard ( http://www.subBlue.com/ )
   Modified by:     Daniel St. Jules ( http://www.gamexe.net/ )

   NOTE: This page was generated by phpBB, the free open-source bulletin board package.
         The phpBB Group is not responsible for the content of this page and forum. For more information
         about phpBB please visit http://www.phpbb.com
-->

<!--[if lt IE 7]>
    <script src="{T_TEMPLATE_PATH}/IE7.js" type="text/javascript"></script>
<![endif]-->

<script type="text/javascript">
// <![CDATA[
<!-- IF S_USER_PM_POPUP -->
   if ({S_NEW_PM})
   {
      popup('{UA_POPUP_PM}', 400, 225, '_phpbbprivmsg');
   }
<!-- ENDIF -->

if (typeof blankImg == 'undefined') var blankImg = '{T_THEME_PATH}/images/spacer.gif';

function popup(url, width, height, name)
{
   if (!name)
   {
      name = '_popup';
   }

   window.open(url.replace(/&amp;/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes,width=' + width);
   return false;
}

function jumpto()
{
   var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
   var per_page = '{PER_PAGE}';
   var base_url = '{A_BASE_URL}';

   if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
   {
      if (base_url.indexOf('?') == -1)
      {
         document.location.href = base_url + '?start=' + ((page - 1) * per_page);
      }
      else
      {
         document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
      }
   }
}

/**
* Find a member
*/
function find_username(url)
{
   popup(url, 760, 570, '_usersearch');
   return false;
}

/**
* Mark/unmark checklist
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
function marklist(id, name, state)
{
   var parent = document.getElementById(id);
   if (!parent)
   {
      eval('parent = document.' + id);
   }

   if (!parent)
   {
      return;
   }

   var rb = parent.getElementsByTagName('input');
   
   for (var r = 0; r < rb.length; r++)
   {
      if (rb[r].name.substr(0, name.length) == name)
      {
         rb[r].checked = state;
      }
   }
}

<!-- IF ._file -->

   /**
   * Play quicktime file by determining it's width/height
   * from the displayed rectangle area
   *
   * Only defined if there is a file block present.
   */
   function play_qt_file(obj)
   {
      var rectangle = obj.GetRectangle();

      if (rectangle)
      {
         rectangle = rectangle.split(',')
         var x1 = parseInt(rectangle[0]);
         var x2 = parseInt(rectangle[2]);
         var y1 = parseInt(rectangle[1]);
         var y2 = parseInt(rectangle[3]);

         var width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1;
         var height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1;
      }
      else
      {
         var width = 200;
         var height = 0;
      }

      obj.width = width;
      obj.height = height + 16;

      obj.SetControllerVisible(true);

      obj.Play();
   }
<!-- ENDIF -->

// ]]>
</script>
<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />
<!--[if lt IE 8]><link href="{T_THEME_PATH}/ie.css" rel="stylesheet" type="text/css" /><![endif]-->
</head>
<body id="phpbb" class="{S_CONTENT_DIRECTION}">

<table id="container" cellspacing="0" cellpadding="0" border="0">
<tr>
<td id="bgleft"><img src="{T_THEME_PATH}/images/spacer.gif" width="53px" alt="" /></td>
<td id="middle" valign="top">
<a id="top" name="top" accesskey="t"></a>

<div id="wrapper">

<div id="banner">
   <a href="{U_INDEX}" title="{L_INDEX}" id="logo">{SITE_LOGO_IMG}</a>
</div>

<div id="header">
   <div id="menu">
      <ul id="nav">
      <li><a class="faq" href="{U_FAQ}" title="{L_FAQ_EXPLAIN}"><span>{L_FAQ}</span></a></li>
      <!-- IF not S_IS_BOT -->
          <!-- IF S_DISPLAY_MEMBERLIST --><li><a class="members" href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}"><span>{L_MEMBERLIST}</span></a></li><!-- ENDIF -->
         <!-- IF S_DISPLAY_SEARCH --><li><a class="search" href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}"><span>{L_SEARCH}</span></a></li><!-- ENDIF -->
         <!-- IF S_USER_LOGGED_IN -->
             <li><a class="ucp" href="{U_PROFILE}" title="{L_PROFILE}"><span>{L_PROFILE}</span></a></li>
            <!-- IF not S_USER_UNREAD_PRIVMSG --><li><a class="nonewpms" href="{U_PRIVATEMSGS}"><span>{PRIVATE_MESSAGE_INFO}</span></a></li><!-- ENDIF -->
            <!-- IF S_USER_UNREAD_PRIVMSG --><li><a class="newpms" href="{U_PRIVATEMSGS}" title="{PRIVATE_MESSAGE_INFO}"><span>{PRIVATE_MESSAGE_INFO}</span></a></li><!-- ENDIF -->
         <!-- ENDIF -->
      <!-- ENDIF -->
      <!-- IF U_MCP --><li><a class="mcp" href="{U_MCP}"><span>{L_MCP}</span></a></li><!-- ENDIF -->
      </ul>
   </div>

   <div id="crumbs">
   
   <!-- IF not S_USER_LOGGED_IN and not S_IN_UCP -->
   <form action="{U_LOGIN_LOGOUT}" method="post">
      <table class="toplogin" cellspacing="0">
          <tr>
              <td><span class="gensmall">{L_USERNAME}:</span></td>
              <td><input class="post" type="text" name="username" size="10" style="width: 75px" /></td>
              <td nowrap="nowrap"><input type="checkbox" checked="checked" class="radio" name="autologin" /><span style="vertical-align: middle;" class="gensmall">{L_LOG_ME_IN}</span></td>
          </tr>
          <tr>
              <td><span class="gensmall">{L_PASSWORD}:</span></td>
              <td><input class="post" type="password" name="password" size="10" style="width: 75px" /></td>
              <td><input type="submit" class="btnmain" name="login" value="{L_LOGIN}" /></td>
          </tr>
      </table>
      {S_LOGIN_REDIRECT}      
      {S_FORM_TOKEN}      
   </form>
   <!-- ENDIF -->
      <ul class="breadcrumbs">
         <li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>
      </ul>
   </div>
   <!-- IF not S_IS_BOT -->
   <ul id="navlist">
      <!-- IF not S_USER_LOGGED_IN and S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) --><li><a href="{U_REGISTER}">{L_REGISTER}</a></li><!-- ENDIF -->
      <li><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="l">{L_LOGIN_LOGOUT}</a></li>
      <!-- IF U_RESTORE_PERMISSIONS --><li><a href="{U_RESTORE_PERMISSIONS}"><span>{L_RESTORE_PERMISSIONS}</a></li><!-- ENDIF -->
   </ul>
   <!-- ENDIF -->
</div>

<div id="ct"><div id="ct2"><div id="ctl"><div id="ctr">
<div id="cb"><div id="cbl"><div id="cbr">

   <div id="wrapheader">
      <table width="100%" cellspacing="0">
      <tr>
         <td class="gensmall"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ENDIF --></td>
         <td class="gensmall" align="{S_CONTENT_FLOW_END}">{CURRENT_TIME}<br /></td>
      </tr>
      </table>
   </div>

   <div id="wrapcentre">

<center>
<a href="http://pallindrome.org/donate" title="Donate" target="_blank"><b><img src="http://thumperdc.com/forum/thumperdc/donate.gif" alt="Donate" border="0" /></b></a>
</center>



<center><b><font size="1" color="yellow">Even a small donation will help us a lot.</font> </b></center>
<center><b><font size="1" color="yellow">Donators [Elite members] will receive special benefits:<a href="http://www.pallindrome.org/viewtopic.php?f=4&t=13"> Elite Benefits</a> </font> </b></center></center>
pallindrome
Cadet IV
Cadet IV
 
Posts: 49
Joined: 26 Mar 2011, 00:58
Gender: Male
phpBB Knowledge: 5

Re: Help with Mod

Postby Sniper_E » 08 Apr 2011, 21:22

OK, your style has a banner instead of a header.
Code: Select all
<div id="banner">
   <a href="{U_INDEX}" title="{L_INDEX}" id="logo">{SITE_LOGO_IMG}</a>
</div>

That is where the section you are looking for is suppose to be.

What does the directions tell you to do after you find that?
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6979
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: Help with Mod

Postby spaceace » 08 Apr 2011, 21:25

Find
Code: Select all
         <td width="100%" align="center"><h1>{SITENAME}</h1><span class="gen">{SITE_DESCRIPTION}</span></td>


replace with
Code: Select all
         <td width="<!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->75%<!-- ELSE -->100%<!-- ENDIF -->" align="center"><h1>{SITENAME}</h1><span class="gen">{SITE_DESCRIPTION}</span></td>
         <!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
         <td width="25%" align="right">
            <form action="{U_SEARCH}" method="post">
            <input name="keywords" type="text" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" />
            <input value="{L_SEARCH}" type="submit" /><br />
            <label for="gSearch">{L_SEARCH_GOOGLE} <input class="radio" style="vertical-align: middle;" name="gsearch" type="checkbox" id="gSearch" /></label><br />
            <a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_SEARCH_HIDDEN_FIELDS}
            </form>
         </td>
         <!-- ENDIF -->
      </tr>
User avatar
spaceace
Supporter
Supporter
 
Posts: 263
Joined: 14 Feb 2008, 20:44
Location: Ontario, Canada
Gender: Male
phpBB Knowledge: 5

Re: Help with Mod

Postby Sniper_E » 08 Apr 2011, 21:37

Then what he may need to do is,

FIND
Code: Select all
<div id="banner">
   <a href="{U_INDEX}" title="{L_INDEX}" id="logo">{SITE_LOGO_IMG}</a>
</div>
ADD after
Code: Select all
<!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
      <table width="100%" cellspacing="0">
      <tr>
             <td width="100%" align="right">
                <form action="{U_SEARCH}" method="post">
                <input name="keywords" type="text" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" />
                <input value="{L_SEARCH}" type="submit" /><br />
                <label for="gSearch">{L_SEARCH_GOOGLE} <input class="radio" style="vertical-align: middle;" name="gsearch" type="checkbox" id="gSearch" /></label><br />
                <a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_SEARCH_HIDDEN_FIELDS}
                </form>
             </td>
          </tr>
      </table>
<!-- ENDIF -->

Maybe add it under his banner. What do you think spaceace? I don't know that style.
I know his banner is a linked image. One I'm sure he wants to keep.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6979
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Next

Return to phpBB3 Coding Assistance

Who is online

Users browsing this forum: No registered users and 11 guests