coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: albrum on March 12, 2007, 10:50:54 PM

Title: adding and modifying pages for dummies
Post by: albrum on March 12, 2007, 10:50:54 PM
Sorry, I know you don't like giving individual support so is there anywhere that gives simple step by step instructions on how to edit and add buttons (along with pages) to those of us that know nothing about php and html?

I have installed the miniCMS plugin but it only seems to let me create pages, I want to edit a template as well. I have looked at the thread about adding buttons using miniCMS but it still leaves me a little baffled. I'm using the igames theme at www.al-birmingham.co.uk  (http://www.al-birmingham.co.uk)

Thanks for any pointers you can give me, as I said I know you don't like puppywalking guys like me so if you know of a place that does? Failing that where can I find php tutorials for dummies?

Al
Title: Re: adding and modifying pages for dummies
Post by: Joachim Müller on March 13, 2007, 07:48:27 AM
There's no need to know PHP if you just want to add some links to your template. Edit themes/yourtheme/template.html with a plain-text editor. All you need to know is HTML. For details, post what you actually want to see accomplished, i.e. what buttons you want to see at which place.
Title: Re: adding and modifying pages for dummies
Post by: albrum on March 13, 2007, 10:08:52 AM
I really appreciate this,
In igames I want to add a 'Links page' and button and an 'about me' page and button. The buttons need to be in the same line as the 'top rated/most viewed' buttons ie where the custom link button gets put.

I have used the custom link option already. I'm assuming that once the button line is sorted I just need to work out how to point the buttons at the right place and then use the template.html to create the new pages?

I have adobe GoLive of which I have some limited knowledge or MS notepad etc.

Al
Title: Re: adding and modifying pages for dummies
Post by: phill104 on March 13, 2007, 08:13:21 PM
You need to edit your themes.php code.

As an example I have added a homepage button to my test setup http://www.windsurf.me.uk/cpgtest/index.php (http://www.windsurf.me.uk/cpgtest/index.php)

this was simply done by inserting the following code in the igames themes.php

<td class="top_menu_bttn">
                                                <a href="http://www.windsurf.me.uk" title=Homepage>Homepage</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">


You can add more buttons by repeating the above code and edditing as needed and adjusting this line <a href="http://www.windsurf.me.uk" title=Homepage>Homepage</a> to your details

Title: Re: adding and modifying pages for dummies
Post by: albrum on March 14, 2007, 11:23:05 PM
Ok Phill, but where in the themes.php do I put the code? Anywhere?

I've tried changing the template.html file but I keep getting this www.al-birmingham.co.uk/wrongindex.html (http://www.al-birmingham.co.uk/wrongindex.html) , how come the words in brackets appear instead of the buttons?

I did say at the start of this thread that I am a coding dummy, I really appreciate all the help and advice.

Al
Title: Re: adding and modifying pages for dummies
Post by: Joachim Müller on March 15, 2007, 08:51:14 AM
Edit http://www.al-birmingham.co.uk/themes/igames/theme.php (using a plain-text editor), find// HTML template for template sub_menu
// special note: I left the JavaScript 'hide' off of the first and third buttons to help avoid trouble keeping sys_menu open. :Donnoman
if ($CONFIG['custom_lnk_url'] != '') {
$template_sub_menu = <<<EOT
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
<!-- BEGIN custom_link -->
                                                                                <td class="top_menu_left_bttn">
                                                <a href="{CUSTOM_LNK_TGT}" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
<!-- END custom_link -->
                                        <td class="top_menu_bttn">
                                                <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="javascript:;" onmouseover="MM_showHideLayers('SYS_MENU','','show')">@</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{LASTUP_TGT}" title="{LASTUP_LNK}">{LASTUP_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{LASTCOM_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{LASTCOM_LNK}">{LASTCOM_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{TOPN_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{TOPN_LNK}">{TOPN_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{TOPRATED_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{TOPRATED_LNK}">{TOPRATED_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{FAV_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{FAV_LNK}">{FAV_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_right_bttn">
                                                <a href="{SEARCH_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{SEARCH_LNK}">{SEARCH_LNK}</a>
                                        </td>
                                        <td width="100%">&nbsp;</td>
                                </tr>
                        </table>
EOT;

} else {

$template_sub_menu = <<<EOT
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
<!-- BEGIN custom_link -->
<!-- END custom_link -->
                                        <td class="top_menu_left_bttn">
                                                <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="javascript:;" onmouseover="MM_showHideLayers('SYS_MENU','','show')">@</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{LASTUP_TGT}" title="{LASTUP_LNK}">{LASTUP_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{LASTCOM_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{LASTCOM_LNK}">{LASTCOM_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{TOPN_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{TOPN_LNK}">{TOPN_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{TOPRATED_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{TOPRATED_LNK}">{TOPRATED_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{FAV_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{FAV_LNK}">{FAV_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_right_bttn">
                                                <a href="{SEARCH_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{SEARCH_LNK}">{SEARCH_LNK}</a>
                                        </td>
                                        <td width="100%">&nbsp;</td>
                                </tr>
                        </table>
EOT;
}
and add the code that Phil suggested. This is plain HTML, as I suggested. I will give you an example: If you want to add a link to Google, find<!-- BEGIN custom_link -->
                                                                                <td class="top_menu_left_bttn">
                                                <a href="{CUSTOM_LNK_TGT}" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
<!-- END custom_link -->
and add before it (in a new line)                                                                                <td class="top_menu_left_bttn">
                                                <a href="http://google.com/" title="Let's go to Google">Google</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
As there is a conditional at athe very top that checks if a custom link exists or not, you'll have to perform another edit: find<!-- BEGIN custom_link -->
<!-- END custom_link -->
and add the code I suggested above in a new line before it as well.

Doesn't get simpler than that.
Title: Re: adding and modifying pages for dummies
Post by: albrum on March 15, 2007, 10:39:30 PM
Fantastic!
That's the buttons issue sorted out and thanyou both very much indeed for your help.

Any ideas on why the template page isn't behaving? I'm not sitting back and waiting to be spoon fed on this btw, I keep plugging at it whilst waiting for your answers so if I crack it I'll let you know.

Al
Title: Re: adding and modifying pages for dummies
Post by: phill104 on March 15, 2007, 11:05:59 PM
What do you mean by not behaving?
Title: Re: adding and modifying pages for dummies
Post by: albrum on March 15, 2007, 11:48:11 PM
Here is an example

www.al-birmingham.co.uk/wrongindex.html (http://www.al-birmingham.co.uk/wrongindex.html)

The buttons don't appear, instead I get the menu names in brackets, weird, huh?
Title: Re: adding and modifying pages for dummies
Post by: Nibbler on March 16, 2007, 12:17:19 AM
To make new pages, use the code given here (http://forum.coppermine-gallery.net/index.php?topic=36578.0) as your base, saving it as whatever.php. Then link to that.
Title: Re: adding and modifying pages for dummies
Post by: albrum on March 16, 2007, 04:45:17 PM
Gentlemen,
Thankyou so much for all your help, my problems are sorted thanks to you.