TinyPortal

Development => Support => Topic started by: SundayNiagara on August 25, 2005, 03:36:15 PM

Title: Making Static Pages Mod work with buttons
Post by: SundayNiagara on August 25, 2005, 03:36:15 PM
I already know how to do that.  But it doesn't look right that way, so does anyone know how to make this work with buttons?
Mark
Title: Making Static Pages Mod work with buttons
Post by: gelsbern on August 25, 2005, 03:46:26 PM
Could you explain what you mean about with buttons?   Do you mean adding buttons to your menu bar?

I find one must be very clear what one is asking in this forum as a lot of people don't speak english natively.

If you aren't clear, your either get the wrong answer (as I apparently gave above) or no answer.


If you are looking on how to make a link to your page with a button and adding a button I would look here

http://www.tinyportal.net/smf/index.php?topic=448.0

or use this site's search function.

Have a great day.
Title: Making Static Pages Mod work with buttons
Post by: SundayNiagara on August 25, 2005, 03:54:42 PM
Here is my point:  Do you expect your members to type this http://www.yoursite.com/index.php?action=static&staticpage=1 , when they visit, or wouldn't it look real nice, using a button from the main menu?
Mark
Title: Making Static Pages Mod work with buttons
Post by: gelsbern on August 25, 2005, 04:01:28 PM
Ahh gotcha, then that link I gave in the last post should be what you are looking for.

http://www.tinyportal.net/smf/index.php?topic=448.0

Sorry about the confusion.

Title: Making Static Pages Mod work with buttons
Post by: SundayNiagara on August 27, 2005, 04:20:32 AM
I just know there is someone who can tie this all together in one place, (here) instead of jumping all over the place.  I'm going around in circles and still don't have this mod working to my satisfaction.  Which is; by using a button from the main menu.  Anyone??????????????
Mark

PS:  Take a look at my sites, they are XMB forums, with many of the pages done with a custom add-on page.  I just can't help but wonder why this can't be done with smf.

http://www.americandragracing.com/xmb1/portal.php
http://www.sundayniagara.com/forum/portal.php
Title: Making Static Pages Mod work with buttons
Post by: IchBin on August 27, 2005, 06:25:10 PM
Sunday, tell me what theme your using (is it a TP theme?) and give me the link you need put in, and I will do it for you.
Title: Making Static Pages Mod work with buttons
Post by: SundayNiagara on August 27, 2005, 06:36:18 PM
Yes, it is the helios_multi_tp theme.  However, I would like to do this myself, if I can get an explanation:  Step a, step b, etc.
Mark
Title: Making Static Pages Mod work with buttons
Post by: IchBin on August 27, 2005, 08:51:04 PM
The reason why I asked was because this link:

http://www.tinyportal.net/smf/index.php?topic=448.0

shows you how to do it You just have to change the image for your button and the text.
Title: Making Static Pages Mod work with buttons
Post by: SundayNiagara on August 27, 2005, 08:53:39 PM
That refers to "Coppermine."  Not what I'm talking about.  Please describe the steps here.
Mark
Title: Making Static Pages Mod work with buttons
Post by: IchBin on August 27, 2005, 09:01:03 PM
That link describes putting a link in your theme. He just happens to want it to point to coppermine. Lets examine the link shall we?

<a href="this is where you put the link">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/this is where you put your image" alt="alt text for image" style="margin: 2px 0;" border="0" />' : 'Name of your link here'), '</a>', $context['menu_separator'], '

However, this will be slightly different depending on which theme you use. But since you wont tell me I can't give you the exact link.
Title: Making Static Pages Mod work with buttons
Post by: SundayNiagara on August 29, 2005, 12:21:26 AM
I previously stated that I am using the helios_multi_tp theme .  I have 6 different buttons ready. helios_links , helios_gallery , helios_nascar , helios_news , helios_races , helios_reunions and helios_webservices .  I want this mod to work from the main menu, just like my sites do now.
Mark
Title: Making Static Pages Mod work with buttons
Post by: IchBin on August 29, 2005, 03:47:31 AM
My apologies, I read so many threads here I didn't remember you telling me that.

Anyway, here we go. Search for this line in the helios index.template.php.

echo '<td><a href="">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/forum.gif" alt="Forum" style="margin: 0px 0;" border="0" />' : 'Forum'), '</a></td>';

What you can do is copy that line and paste it after that line. Then edit it each time you need for each link you're going to put in.
Here's and example of what you would do:

echo '<td><a href="link to your file (links.html?)">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/name of your image here(helios_links.gif)" alt="Links" style="margin: 0px 0;" border="0" />' : 'Links'), '</a></td>';
Title: Making Static Pages Mod work with buttons
Post by: SundayNiagara on August 29, 2005, 04:11:11 AM
Normally this code is in a section after // ????????????????????????????????????? .  Can you tell me where?  I can get close, but there appears to be more code than you are showing.
Mark
Title: Making Static Pages Mod work with buttons
Post by: IchBin on August 29, 2005, 05:42:51 AM
Its towards the bottom of the index.template.php file where it says.
// Show the [home] and [help] buttons.
Title: Making Static Pages Mod work with buttons
Post by: SundayNiagara on August 29, 2005, 06:10:37 AM
echo '<td><a href="', $scripturl, '?action=forum">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/forum.gif" alt="Forum" style="margin: 0px 0;" border="0" />' : 'Forum'), '</a></td>';

This is as close as I can get.  Is this it?
Title: Making Static Pages Mod work with buttons
Post by: Bjørn on August 29, 2005, 10:20:08 AM
Yes it is.
Title: Making Static Pages Mod work with buttons
Post by: SundayNiagara on August 29, 2005, 04:15:26 PM
What do I name this page, links.php?
Mark
Title: Making Static Pages Mod work with buttons
Post by: Bjørn on August 29, 2005, 04:25:42 PM
No..you just use the same index.template.php. I assume you want extra buttons? Then you need to add that code bit for every extra button you want to show.
Title: Making Static Pages Mod work with buttons
Post by: SundayNiagara on August 29, 2005, 04:44:49 PM
No, the static page, what do i call that?
Mark
Title: Making Static Pages Mod work with buttons
Post by: IchBin on August 29, 2005, 08:01:52 PM
What type of page is it? Is it a php or html page? If it has any php code in it you must name it .php. You can name it whatever you want as long as it's the right filetype. Then, in your link you must use the same name to call it.
Title: Making Static Pages Mod work with buttons
Post by: SundayNiagara on August 29, 2005, 08:16:08 PM
I haven't given it a name yet, but I want it to match the rest of the forum/portal.  My sites, which are XMB forums have pages in .php which match perfectly.  Do I need to use the code that comes with the mod?
Mark

PS:  Click on the first 2 sites below and you'll see what I mean.
Title: Making Static Pages Mod work with buttons
Post by: IchBin on August 29, 2005, 09:35:47 PM
I would just do it like you already are. So for instance name the page links.php (if it's a php file) and then name the actual link "Links".

Just out of curiousity, where's TinyPortal fit into all of this if your forums are XMB?
Title: Making Static Pages Mod work with buttons
Post by: SundayNiagara on August 29, 2005, 09:42:46 PM
I am thinking of switching.  I don't think I'm finished with questions yet.
Mark
Title: Making Static Pages Mod work with buttons
Post by: PhilH on August 30, 2005, 02:18:40 AM
QuoteI am thinking of switching.  I don't think I'm finished with questions yet

Hey Mark, do you have a url to your Tiny Portal/SMF test site so we can see how you are progressing?
Title: Making Static Pages Mod work with buttons
Post by: SundayNiagara on August 30, 2005, 02:24:57 AM
I just have the package installed.  I would like to see it work on someone else's site first.
Mark
Title: Making Static Pages Mod work with buttons
Post by: gelsbern on August 30, 2005, 04:00:57 AM
It's almost too bad there is such confusion on this.  I wrote my modifcations  SPECIFICALLY the Static Page Mod which is found here, http://mods.simplemachines.org/index.php?mod=130

It sounds as if you are miles outside the scope of the original post and I almost feel as if the topic has been hijacked.  So much so that I had to turn off notifications of replies to the post, which I left on in case people had questions about the stuff I did.   You have asked multiple times what you call the static pages, and all the instructions for how to call up your static pages IF YOU ARE USING THE STATIC PAGE MOD, are in the readme for that mod.

If you are not using that mod, I would ask that your reply and all subsequent replies that are not related to the actual Static Page MOD be moved to a different thread so that this thread is cleaned up and I can help people who are trying to use the Mod for which my contribution was intended.


If you are working with the Static Page MOD you can see it at work on the site I gave in the original post.

Thank you,
Greg Elsbernd
Title: Making Static Pages Mod work with buttons
Post by: SundayNiagara on August 30, 2005, 04:06:39 AM
Is it working with buttons?
Mark
Title: Making Static Pages Mod work with buttons
Post by: PhilH on August 30, 2005, 04:18:03 AM
Mark,
The buttons you have asked about a number of times are a SMF function. You have recieved numerous replys to your button question, perhaps you should search the SMF site for more info regarding buttons.

I agree with gelsbern, you have hijacked this topic and I have contributed to the problem by responding to your posts. My apologies gelsbern.

Mark, please see http://www.tinyportal.net/smf/index.php?topic=581.0 (http://www.tinyportal.net/smf/index.php?topic=581.0)
Title: Making Static Pages Mod work with buttons
Post by: SundayNiagara on August 30, 2005, 04:52:25 AM
Let him start another thread, since he obviously doesn't want to this the right way, which is with buttons.  No one in their right mind wants to type in a long line of code to see a page.  I'll stay right here until I get the answers I'm looking for.  I don't like jumping all over the place to get information.
Mark
Title: Making Static Pages Mod work with buttons
Post by: IchBin on August 30, 2005, 05:37:07 AM
I will be splitting this topic as it went from a How to install static page mod to how to insert buttons into themes etc for static page mod, when I figure out where to split it. :) It will help others find the post easier IMO if it has a good topic and discussion.
Sorry if this upsets you Sunday, but I think you need your own topic. :)
Title: Re: Making Static Pages Mod work with buttons
Post by: gelsbern on August 30, 2005, 06:51:59 PM
Quote from: SundayNiagara on August 30, 2005, 04:52:25 AM
Let him start another thread, since he obviously doesn't want to this the right way, which is with buttons.ÃÆ'ââ,¬Å¡Ãƒâ€šÃ,  No one in their right mind wants to type in a long line of code to see a page.ÃÆ'ââ,¬Å¡Ãƒâ€šÃ,  I'll stay right here until I get the answers I'm looking for.ÃÆ'ââ,¬Å¡Ãƒâ€šÃ,  I don't like jumping all over the place to get information.
Mark


Dude, I am usually a very patient man, but they have explained where to put the buttons, if you are using the static page mod, you would make the button link to:

http://www.yoursite.com/index.php?action=static&staticpage=XÃÆ'ââ,¬Å¡Ãƒâ€šÃ, 


where X is the number of the page you created in the admin/settings and features

It's that simple, no one has to type any long links.  Static page mod is just for adding static pages, my contribution is making those pages appear to be a part of the Tiny portal.  HOW a person gets to those pages is completely up to the person who runs the site, not me, not the original creator of the static page mod.

You have to edit the files that they have told you stick in the code for the button and make it link to the static page as given in the instructions in the static page mod.  It's not hard/

On and thank you to Ichbin for splitting this off from the original topic.
Title: Re: Making Static Pages Mod work with buttons
Post by: SundayNiagara on September 01, 2005, 02:41:24 AM
When it comes to custom page mods, this is what I am talking about.  I name the page, type in whatever_header template the page will call from, copy, re-name and paste a template into the templates box and it blends in seamlessly with the message board.  Maybe this is what I'm really looking for.  This SMF system works somewhat differently, but I'd be willing to bet it could be done.
Mark

http://www.xmbxtreme.com/viewthread.php?tid=3230

PS:  You can't tell that it's a custom page mod.

PPS:  I have to add a plug-in into config.php for it to work.