I want to add a random quote to the Prosilver Header

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Get Involved
Locked
User avatar
kopacko
Registered User
Posts: 254
Joined: Mon Feb 17, 2003 1:39 am

I want to add a random quote to the Prosilver Header

Post 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>
User avatar
Raimon
Former Team Member
Posts: 12088
Joined: Tue May 30, 2006 5:31 pm
Location: Netherlands
Name: Raimon Meuldijk
Contact:

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

Post by Raimon »

Can you post a URL to your board, so we can see the quotes live on action?
Need phpBB installation, extenstions, Styles or integrate phpBB with you website?
Contact me for fair prices and good service!
User avatar
kopacko
Registered User
Posts: 254
Joined: Mon Feb 17, 2003 1:39 am

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

Post 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?
drankur
Registered User
Posts: 271
Joined: Sat Dec 22, 2007 4:16 am

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

Post by drankur »

include it in view form and view topic and index page
User avatar
kopacko
Registered User
Posts: 254
Joined: Mon Feb 17, 2003 1:39 am

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

Post 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.
User avatar
kopacko
Registered User
Posts: 254
Joined: Mon Feb 17, 2003 1:39 am

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

Post by kopacko »

Any suggestions?
drankur
Registered User
Posts: 271
Joined: Sat Dec 22, 2007 4:16 am

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

Post by drankur »

can u share the code which u r trying to put so that i can help u
User avatar
kopacko
Registered User
Posts: 254
Joined: Mon Feb 17, 2003 1:39 am

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

Post by kopacko »

It is just a single line of a php include. My problem is, I do not know where to put :-)
User avatar
oddfish
Registered User
Posts: 839
Joined: Mon Mar 19, 2007 8:45 pm
Location: Testing 3.1
Contact:

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

Post 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).
Last edited by oddfish on Sat Dec 12, 2009 12:43 am, edited 1 time in total.
Country Flag User Edition Clickable Post Count Link

... another record broken without breaking any records ...
Testing phpBB3.1 dark style based on prosilver ... http://www.oddmods.net
CrypticAce522
Registered User
Posts: 33
Joined: Fri May 08, 2009 10:01 pm

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

Post 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?
User avatar
oddfish
Registered User
Posts: 839
Joined: Mon Mar 19, 2007 8:45 pm
Location: Testing 3.1
Contact:

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

Post 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 ...
Country Flag User Edition Clickable Post Count Link

... another record broken without breaking any records ...
Testing phpBB3.1 dark style based on prosilver ... http://www.oddmods.net
CrypticAce522
Registered User
Posts: 33
Joined: Fri May 08, 2009 10:01 pm

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

Post 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??
User avatar
kopacko
Registered User
Posts: 254
Joined: Mon Feb 17, 2003 1:39 am

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

Post 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.
Locked

Return to “[3.0.x] Styles Support & Discussion”