Customizing SMF > Graphics and Templates
A Little Theme Help Please
(1/1)
ECCShaman:
As far as php code and development goes I am pretty much still a rookie to the game. I am better at working with graphics and things of that nature than I am with code.
I am doing some theme work and so far I have managed to master changing colors. That is a fairly easy task using the index.template.php and styles.css files, and the instructions already posted at the SMF forums. Thanks to everyone who helped provide the methods necessary to change the settings for theme colors.
I tried a couple of the codes out for putting a top table and side table on the default theme, but I could get neither to work correctly, and there were bits and pieces of data missing. No big deal. It was educational to work with the settings and codes. Trial and error is a positive educational and skill building tool.
Here is my test site. I already have a forums up and running, but I want to change the theme, so I set up a separate test forums for that purpose. The test area is pretty basic.
http://www.earthchangescentral.com/testarea/index.php
Here is what I would like to do:
I would like to do a graphic / image where the ECC BETA Test Forums text is currently located and would like to know the correct procedure to do so, including the code if possible.
Also, I would like to add a forms button (PayPal) to the bottom of the page, to the left of the h_powered-mysql.gif button. I have tried several times to do so, but have messed the page up each and every attempt.
After that I am going to develop some buttons for use with the site.
Any help would be gratefully appreciated.
Thanks in advance...
ECCShaman
PS: Once I get this done I'll make the theme readily available for other SMF users, as this is beneficial to everyone who uses SMF, and may help others with having a theme of their own.
A.M.A:
Forum's Name as an image:
in (index.template.php) look for:
--- Code: ---', $context['forum_name'], '
--- End code ---
and replace it with
--- Code: ---<img src="', $settings['images_url'], '/smflogo.gif" width="250" style="float: left;" alt="" />
--- End code ---
note: only change the name of the image and its width , and do not forget to put the image in Themes\name_of_theme\images
PayPal image:
in (index.template.php) look for:
--- Code: ---<a href="http://www.mysql.com/"><img id="powered-mysql" src="', $settings['images_url'], '/powered-mysql.gif" alt="', $txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" border="0" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
--- End code ---
add before it
--- Code: ---<a href="http://www.mysql.com/"><img src="', $settings['images_url'], '/powered-mysql.gif" alt="tool tip" width="54" height="20" style="margin: 5px 16px;" border="0" /></a>
--- End code ---
note: only change the name of the image and its width - height , and do not forget to put the image in Themes\name_of_theme\images
the php pic will be placed under the mysql pic so to make room for the new pic.
ECCShaman:
Thanks A.M.A.
Great - after a little trial and error the solution for #1 is accomplished. I will go back into the file a little later and do the necessary resizing, and image file corrections. Many thanks for the great tip.
As for the second code, it could end up not working because I need to insert a <form action="https:// code into the area in order to make the PayPal button correctly work. The PayPal image itself is accessed via the PayPal website - not the server my website is on. I looked around in the PHP Manual for a specific solving problem answer for how to insert the necessary form code, but I am still at a loss to do it correctly.
Here is the PayPal code I am having to work with, minus the exact account information.
--- Code: ---<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="me@myemail.com">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="tax" value="0">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
--- End code ---
Additional suggestions and recommendations would be appreciated.
[Unknown]:
Just change "it's" to "it\'s" or "it is".
-[Unknown]
ECCShaman:
--- Quote from: [Unknown] on April 13, 2004, 10:32:38 PM ---Just change "it's" to "it's" or "it is".
-[Unknown]
--- End quote ---
;D Cool....
Many thanks for the tip about fixing the "it's" in the code. It's amazing how something that small and seemingly benign, wrecks havoc on things.
The test area I have created is looking good thanks to this forum and the help from individuals like yourself. Many thanks to everyone who helped...
ECC Shaman
Navigation
[0] Message Index
Go to full version