Page 1 of 1

I want to add a random quote to the Prosilver Header

Posted: Tue Apr 28, 2009 8:37 pm
by kopacko
Hello,
I am trying to add a random quote to the prosilver header. No matter where I put it, it seems to mess the layout of everything below the header. I want to have the quote centered and below the logo, site name, description, and search function.

Can anyone help?

Code: Select all

		<div class="headerbar">
			<div class="inner"><span class="corners-top"><span></span></span>

			<div id="site-description">
				<a href="{U_INDEX}" title="{L_INDEX}" id="logo">{SITE_LOGO_IMG}</a>
				<h1>{SITENAME}</h1>
				<p>{SITE_DESCRIPTION}</p>
				<p style="display: none;"><a href="#start_here">{L_SKIP}</a></p>
				<br>
				<!-- INCLUDEPHP /quotes.php -->
			</div>

		<!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
			<div id="search-box">
				<form action="{U_SEARCH}" method="post" id="search">
				<fieldset>
					<input name="keywords" id="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 class="button2" value="{L_SEARCH}" type="submit" /><br />
					<a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_SEARCH_HIDDEN_FIELDS}
				</fieldset>
				</form>
			</div>
		<!-- ENDIF -->

			<span class="corners-bottom"><span></span></span></div>
		</div>

Re: I want to add a random quote to the Prosilver Header

Posted: Tue Apr 28, 2009 9:17 pm
by Raimon
Can you post a URL to your board, so we can see the quotes live on action?

Re: I want to add a random quote to the Prosilver Header

Posted: Wed Apr 29, 2009 1:04 pm
by kopacko
Well,
I have it working now, but it is screwing up the rest of the layout so I have turned it off again. I think since I am using overall_header.html that it will only update once, until I clear the cache. So, do you have a better suggestion on where I should implement it?

Re: I want to add a random quote to the Prosilver Header

Posted: Wed Apr 29, 2009 2:34 pm
by drankur
include it in view form and view topic and index page

Re: I want to add a random quote to the Prosilver Header

Posted: Wed Apr 29, 2009 2:44 pm
by kopacko
I suck at coding, so where would I put the code at in the viewforum.php, viewtopic.php, and index.php?

I am also running Board3 portal.

Re: I want to add a random quote to the Prosilver Header

Posted: Fri May 08, 2009 9:07 pm
by kopacko
Any suggestions?

Re: I want to add a random quote to the Prosilver Header

Posted: Sat May 09, 2009 3:47 am
by drankur
can u share the code which u r trying to put so that i can help u

Re: I want to add a random quote to the Prosilver Header

Posted: Sat May 09, 2009 5:57 pm
by kopacko
It is just a single line of a php include. My problem is, I do not know where to put :-)

Re: I want to add a random quote to the Prosilver Header

Posted: Sat May 09, 2009 10:34 pm
by oddfish
still does not really help without seeing the code kopako.

... but do check my site for a quote in the header (select prosilver from the Style: in the header -- or any style to see it in action).

Re: I want to add a random quote to the Prosilver Header

Posted: Sun May 10, 2009 12:40 am
by CrypticAce522
Open up overal_header.html

Find:

Code: Select all

	<a href="{U_SEARCH}" 

title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_SEARCH_HIDDEN_FIELDS}
				</fieldset>
				</form>



			</div>
Add Below:

Code: Select all

<div id="headerquote" class="headerquote">
<p>"Trust in the Lord with all your heart and lean not on your own understanding. <br />In all 

your ways acknlowedge him, and he will direct your paths."</p></div>
Now you need to add a little bit of CSS. Go to /styles/prosilver/theme/common.css and add this code to it.
It doesn't matter where in common.css you add it, but a logical place would be after

Code: Select all

#site-description h1 {
	margin-right: 0;
}
Add this in /styles/prosilver/theme/common.css

Code: Select all

div.headerquote {
	font-size: 10px;
	margin-top: 77px;
	margin-bottom:0px ;
	text-align: center;
}
Refresh your theme and template. And if it doesn't work refresh your computer cache. Go to http://isogaming.net/phpbbtest/index.php to see what it will look like. You can modify any of the values how you want. I'm assuming you just wanted one single quote in the header?

Re: I want to add a random quote to the Prosilver Header

Posted: Sun May 10, 2009 1:33 am
by oddfish
CrypticAce522 wrote:... I'm assuming you just wanted one single quote in the header?
why assume when it was stated by the OP :
kopacko wrote:Hello,
I am trying to add a random quote ...

Re: I want to add a random quote to the Prosilver Header

Posted: Sun May 10, 2009 3:05 am
by CrypticAce522
oddfish wrote:
CrypticAce522 wrote:... I'm assuming you just wanted one single quote in the header?
why assume when it was stated by the OP :
kopacko wrote:Hello,
I am trying to add a random quote ...
This is really an unecessary post. I noticed on your board that you have different quotes for each page. Maybe he wanted his to be like that??

Re: I want to add a random quote to the Prosilver Header

Posted: Mon May 11, 2009 1:12 pm
by kopacko
Here is my line to include.

<?php include("/home/public_html/quotes/random_quote.php"); ?>

I cannot use overall_header.html as it is cached so only the first time it is used will always show the same quote, over and over, until I clear the cache.