Making link buttons go to correct page

Creating and modifying plugins.
Post Reply
dgu56
Posts: 4
Joined: Mon Nov 20, 2006 8:21 pm

Making link buttons go to correct page

Post by dgu56 »

Hello everybody, this is my first post. I have to say I am impressed with serendipity. I am using the Bex1 template, and it is fantastic. I am amazed at the work that goes in these things, and how nice they look.

Anyway, my question is: how do I set up the links to go where I want? Where, exactly, and in what file, do I add the web address I want the link to go to?

I assume it is in the config file, which looks like this:

$probelang = dirname(__FILE__) . '/lang_' . $serendipity['lang'] . '.inc.php';
if (file_exists($probelang)) {
include $probelang;
} else {
include dirname(__FILE__) . '/lang_en.inc.php';
}
$template_config = array(
array(
'var' => 'navlink1text',
'title' => 'Navlink #1 Text',
'description' => 'Enter the first navigation text',
'type' => 'string',
'default' => 'About',
),
array(
'var' => 'navlink1url',
'title' => 'Navlink #1 URL',
'description' => 'Enter the first navigation URL eg \'http://www.somesite.url\'',
'type' => 'string',
'default' => '#',
),
array(
'var' => 'navlink2text',
'title' => 'Navlink #2 Text',
'description' => 'Enter the second navigation text',
'type' => 'string',
'default' => 'Photos',
),
array(
'var' => 'navlink2url',
'title' => 'Navlink #2 URL',
'description' => 'Enter the second navigation URL eg \'http://www.somesite.url\'',
'type' => 'string',
'default' => '#',
),
array(
'var' => 'navlink3text',
'title' => 'Navlink #3 Text',
'description' => 'Enter the third navigation text',
'type' => 'string',
'default' => 'Projects',
),
array(
'var' => 'navlink3url',
'title' => 'Navlink #3 URL',
'description' => 'Enter the third navigation URL eg \'http://www.somesite.url\'',
'type' => 'string',
'default' => '#',
),
);
?>

(credit to Rebecca Hemstad)

So do I place http://www.somewebpage.com in the VAR, TITLE, DESCRIPTION, or DEFAULT lines? Or am I off base?

Obviously, I'm new at this, although I've managed to change backgrounds, font sizes and colors, etc.. I feel like a paint by numbers artist; as long as the framework is there, I can fill in the areas with what I need. Just don't ask me to draw anything on my own!

Thank you for the help, you people are amazing!
Dave
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

You must be running version 1.0 of Serendipity. The file you mention is only used by version 1.1, and then you would notice the config options when you select the template.

So, what you need to do to change the links is open index.tpl in the bex template folder, You'll find the links you want to change towards the top of the <body> section. They are plain html so go ahead and add your full url (http://...) into the link part, and then just change the name of the link where you see about, projects etc.

Hope that helps,

Carl
dgu56
Posts: 4
Joined: Mon Nov 20, 2006 8:21 pm

Post by dgu56 »

Awesome. I never, ever, would have figured that out. I use the version of Seren that comes on the Godaddy host. I should upgrade, I guess. Is there a simple way so I won't screw things up? I modified Bex1, so I don't want to lose my changes. If I upgrade, should I delete the Bex1 file before I upload?

Thanks again, you guys are like geniuses, eh?
Dave
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

geniuses... nope, only reason I qualified for mensa is coz a bribed someone :D

Um, but now for the bad news. upgrading from 0.8 to 1.0 or 1.1 while using GoDaddy is going to be a headache. Unfortunately the GoDaddy people don't allow their users access to the database so backing up your blog and upgrading it is going to be difficult. You can however backup your template files, and you should do this as a matter of routine anyway.

If you're determined to upgrade Serendipity, which I highly recommend, you're going to need to follow the procedures that other users have followed, a quick search in these forums for 'godaddy' is going to find the latest few threads about this. Please persevere, and if you are able to offer any other observations, some of us are quite keen to develop a step by step guide to upgrading on GoDaddy for future users. Your help could really make a difference.

One final piece of advice, if another user in these forums looks like they may be able to help you don't be shy about sending them a Personal Message, the wonderful thing about our community is that most of us are pretty ok with helping someone out.
dgu56
Posts: 4
Joined: Mon Nov 20, 2006 8:21 pm

Post by dgu56 »

Well, I upgraded, and all's well. I'll post in the installation section with details. Thanks again for all your help!
Dave
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

awesome,

and yes please, we need more info on upgrading for GoDaddy customers. Sometimes it just comes down to writing style even if the process is the same.

Oh, before I forget, welcome to Serendipity!!!
Post Reply