Page 1 of 1
Need coding help in php
Posted: Wed Dec 26, 2007 6:32 pm
by Charles L. Cotton
I want to add the "Join the NRA" logo and link to the header in the forum. People using smaller monitors can't afford to lose the space taken up by the new column on the left. I think I know which file to edit, and I hope I know where, but I'm not at all sure about the code. Does anyone have a suggestion?
Thanks,
Chas.
Re: Need coding help in php
Posted: Wed Dec 26, 2007 7:13 pm
by Blazen
Do you mean up where the banner is at? It should be done in html code, not necessary .php code. Not to say it can't be done, but easier to do it plan html. I would take a copy of the file you think you need to edit and play around and load it up. Once it looks good, make a copy of the org file, then over write it, and see how it looks.
Re: Need coding help in php
Posted: Wed Dec 26, 2007 9:16 pm
by Skiprr
Charles, I think Blazen is correct: there may be a very easy way to do this. But since I don't have v3 running anywhere, I'm just guessing wildly.
In each of the style templates is a file named
overall_header.html. Check down at line 100:
Code: Select all
<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>
</div>
The HTML is pulling in variables defined in /includes/functions.php to build the header. I think all you need to do is add a line to add the NRA image and link (I'd rename the image to get rid of the spaces, though, just to be on the safe side), like:
Code: Select all
<div id="site-description">
<a href="{U_INDEX}" title="{L_INDEX}" id="logo">{SITE_LOGO_IMG}</a>
<a href="http://membership.nrahq.org/default.asp?campaignid=XR019416" target="_blank"><img src="/images/Join_Here_11.gif" width="79" height="106" border="0" alt="Join the NRA"></a>
<h1>{SITENAME}</h1>
<p>{SITE_DESCRIPTION}</p>
<p style="display: none;"><a href="#start_here">{L_SKIP}</a></p>
</div>
If it works, you'd need to modify both the Prosilver and Subsilver
overall_header.html files.
If it doesn't work, then I never said anything.

Re: Need coding help in php
Posted: Wed Dec 26, 2007 9:40 pm
by KC5AV
I'm going to quote you, just in case we need the evidence later.
Skiprr wrote:Charles, I think Blazen is correct: there may be a very easy way to do this. But since I don't have v3 running anywhere, I'm just guessing wildly.
In each of the style templates is a file named
overall_header.html. Check down at line 100:
Code: Select all
<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>
</div>
The HTML is pulling in variables defined in /includes/functions.php to build the header. I think all you need to do is add a line to add the NRA image and link (I'd rename the image to get rid of the spaces, though, just to be on the safe side), like:
Code: Select all
<div id="site-description">
<a href="{U_INDEX}" title="{L_INDEX}" id="logo">{SITE_LOGO_IMG}</a>
<a href="http://membership.nrahq.org/default.asp?campaignid=XR019416" target="_blank"><img src="/images/Join_Here_11.gif" width="79" height="106" border="0" alt="Join the NRA"></a>
<h1>{SITENAME}</h1>
<p>{SITE_DESCRIPTION}</p>
<p style="display: none;"><a href="#start_here">{L_SKIP}</a></p>
</div>
If it works, you'd need to modify both the Prosilver and Subsilver
overall_header.html files.
If it doesn't work, then I never said anything.

Re: Need coding help in php
Posted: Wed Dec 26, 2007 9:43 pm
by Kalrog
I'm not a fan of banners. How about something more simple? Replace the TexasCHLForum.com image at the top with an NRA image and change the link?
Or what about a frame set with the outer/upper frame being the "banner" and the inner/bottom frame being the forum? Similar functionality but without a banner that messes up the formatting.
Re: Need coding help in php
Posted: Thu Dec 27, 2007 10:23 am
by Charles L. Cotton
I would really like to simply put the NRA logo and link on the right side of the current header; i.e. opposite the current TexasCHLforum logo. I think I may try Skiprr's code, but put it at the end of the header code. Obviously, this assumes my code-deficient brain can figure out where that is! All this reminds me of a comment my pistolsmith made one time when I brought him to fix a pistol I had "tinkered" with a bit. He said, "Charles, I have a deal for you. I won't practice law and you don't try to gunsmith." Ed's a wise man.
Chas.