adding and modifying pages for dummies adding and modifying pages for dummies
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

adding and modifying pages for dummies

Started by albrum, March 12, 2007, 10:50:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

albrum

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

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

Joachim Müller

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.

albrum

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

phill104

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

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

It is a mistake to think you can solve any major problems just with potatoes.

albrum

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 , 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

Joachim Müller

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.

albrum

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

phill104

It is a mistake to think you can solve any major problems just with potatoes.

albrum

Here is an example

www.al-birmingham.co.uk/wrongindex.html

The buttons don't appear, instead I get the menu names in brackets, weird, huh?

Nibbler

To make new pages, use the code given here as your base, saving it as whatever.php. Then link to that.

albrum

Gentlemen,
Thankyou so much for all your help, my problems are sorted thanks to you.