News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Website Button

Started by jake1981, May 19, 2007, 04:03:26 PM

Previous topic - Next topic

jake1981

Okay, it seems that there has been a lot of speak about my MOD, sorry I've been coding new MODs..
Yeah, I haven't escaped from country, I've just been busy while creating more stuff..

Let's answer some questions now:

1) I cannot see website button
It has been designed to work ONLY on themes default, classic and babylon. Themes that do not come with "stock" SMF are not supported, support is easy to add for other themes, but you need to do this hand and I'm far too busy to help you out with this, if you have knowledge of PHP you should be able to do this really easily, just check what my MOD added to stock themes and copy similar stuff to your custom theme..

2) I cannot see website button settings in "Features and settings" of admin center!!
Setup has initially been only for supported languages, check out my MOD's page to see what languages are supported.. For non supported languages my button will show (but uses english) but setup won't show to other languages than supported. You can add support for other languages by copying and translating stuff added by my MOD from file modSettings.english.php. Check out what my MOD added to there and translate it to your own language file modSettings.swedish.php for e.g. if you use swedish as your boards language.. File is located in boarddir/Themes/default/languages

3) I want it to say something else than "Website"
Okay, for default theme, go to boarddir/Themes/defaut/languages and open up file index.english.php (or index.yourlanguage.php) and find


$txt['websiteButton_txt'] = 'Website';
$txt['websiteButtonAlt_txt'] = 'Website';


from near end of file. Change 'Website' on both to what you want it to say..

And if you use classic or babylon, go to boarddir/Themes and then babylon or classic(which one you use) and there images and english(or what is chosen language). There you find file websiteButton.gif, edit this image or replace it with button image of your choice (you need to keep same name and picture must be in GIF format)

4) I want to add more buttons
Try my chatroom button MOD. It adds another button and gives even more settings (you can hide it from guests and you can make link to open into new window) and can be manipulated like this button, when you edit language texts, just find chatroom instead of website to change settings of chatroom button :)

5) I want my website button to open to new window
Open index.template.php in your theme's directory and find function show_websitebutton()
from there and edit text where it creates the link (looks similar to this <a href="'..).
Before > in section starting with <a href add this:

target="_blank"


Okay, and before anyone edits their files: take backup, if you mess it, it's a lot easier to return backups instead of fixing a mess..

And someone sayed that people should change texts in modSettings.english.php to change text "Website", changing texts there will change titles used in "Features and settings", the look of button will not change..
I no longer provide support or updates to any of my MODs nor I provide any new themes or MODs in anywhere else expect on my own site (and yes, there's nothing in there) expect for those MODs that I already sent to here that have not yet been approved and if approval requires any changes, I won't provide them no more.

AdrenalineRider

Amazing Mod, works for me. Would work on the "Website" & change the name of it, may be "Home"

ApplianceJunk

Looks just like what I want to do, thanks!

Now if I can get it to work.
I did download it and then tried to install it.
Then I got this message.
I am running SMF 1.1.3 is that why?


Quote
Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.


   Type     Action     Description
1.    Execute Modification    ./Themes/babylon/index.template.php    Test successful
2.    Execute Modification    ./Themes/classic/index.template.php    Test successful
3.    Execute Modification    ./Themes/default/index.template.php    Test successful
4.    Execute Modification    ./Sources/ModSettings.php    Test successful
5.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Help.finnish.php    Skipping file
7.    Execute Modification    ./Themes/default/languages/Help.german.php    Skipping file
8.    Execute Modification    ./Themes/default/languages/ModSettings.english.php    Test successful
9.    Execute Modification    ./Themes/default/languages/ModSettings.finnish.php    Skipping file
10.    Execute Modification    ./Themes/default/languages/ModSettings.german.php    Skipping file
11.    Execute Modification    ./Themes/default/languages/index.english.php    Test successful
12.    Execute Modification    ./Themes/default/languages/index.finnish.php    Skipping file
13.    Execute Modification    ./Themes/default/languages/index.german.php    Test failed
14.    Extract Tree    ./Themes    
15.    Execute Code    add_settings.php

jake1981

Quote from: ApplianceJunk on August 04, 2007, 04:19:19 PM
Looks just like what I want to do, thanks!

Now if I can get it to work.
I did download it and then tried to install it.
Then I got this message.
I am running SMF 1.1.3 is that why?


Quote
Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.


   Type     Action     Description
1.    Execute Modification    ./Themes/babylon/index.template.php    Test successful
2.    Execute Modification    ./Themes/classic/index.template.php    Test successful
3.    Execute Modification    ./Themes/default/index.template.php    Test successful
4.    Execute Modification    ./Sources/ModSettings.php    Test successful
5.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful
6.    Execute Modification    ./Themes/default/languages/Help.finnish.php    Skipping file
7.    Execute Modification    ./Themes/default/languages/Help.german.php    Skipping file
8.    Execute Modification    ./Themes/default/languages/ModSettings.english.php    Test successful
9.    Execute Modification    ./Themes/default/languages/ModSettings.finnish.php    Skipping file
10.    Execute Modification    ./Themes/default/languages/ModSettings.german.php    Skipping file
11.    Execute Modification    ./Themes/default/languages/index.english.php    Test successful
12.    Execute Modification    ./Themes/default/languages/index.finnish.php    Skipping file
13.    Execute Modification    ./Themes/default/languages/index.german.php    Test failed
14.    Extract Tree    ./Themes    
15.    Execute Code    add_settings.php

Are you using possibly german language on your forum? You can safely apply mod even with this error, but I'll check my mod back later, it seems that test is failed with german translation that should be optional, but I might have been sloppy with it :)
I no longer provide support or updates to any of my MODs nor I provide any new themes or MODs in anywhere else expect on my own site (and yes, there's nothing in there) expect for those MODs that I already sent to here that have not yet been approved and if approval requires any changes, I won't provide them no more.

Jade Elizabeth

#25
it installed fine on 1.1.4 but i cannot see the website tab
i set up the link right...but it doesnt show.

ive scoured my admin panel and cant find anything that says "allow website button" or the like lol
im aware that its for 1.1.3 but there really cant be so much coding difference as to stop the mod without showing an error message.
anything i can do? lol

EDIT: works now...kinda weird...lol
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

eleven0

Fatal error: Cannot redeclare show_websitebutton() (previously declared in /home/*****/public_html/forum/Sources/Load.php(1735) : eval()'d code:653) in /home/*****/public_html/forum/Sources/Load.php(1735) : eval()'d code on line 662

I need help solving this problem.  My forum is down.

eleven0

Fatal error: Cannot redeclare show_websitebutton() (previously declared in /home/*****/public_html/forum/Sources/Load.php(1735) : eval()'d code:653) in /home/****/public_html/forum/Sources/Load.php(1735) : eval()'d code on line 662


I need help solving this problem. My forum is down.

shadow82x

#28
Delete the repeating code in index.template.php  that file starting with show_websitebutton() or post the file here..

How do I modify files?
Colin B
Former Spammer, Customize, & Support Team Member

eleven0

Thank you, already fixed it.

romuba

Worked first time and perfectly for me - thank you very much.
Ross Bartholomew
email: [email protected]
www.bartwebsites.com

romuba

Quote from: gffb on June 04, 2007, 02:04:26 PM
Quote from: nitsua on May 22, 2007, 07:11:33 PM
is there a way that instead of it saying "website" can I make it say something else?

Try this...
look for file boarddir/Themes/default/languages/ModSettings.english.php
then look for $txt['websiteButton_title'] = 'Website';
and chnage the word Website to suit your needs.
I also tried it and nothing changed. Is there something that I am missing? I changed it to read: $txt['websiteButton_title'] = 'St Matthew's Website';
Ross Bartholomew
email: [email protected]
www.bartwebsites.com

Jade Elizabeth

try 'St Matthew/'s Website'

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

romuba

I made the change as you, Alundra, suggested but still the button shows as Website.
Ross Bartholomew
email: [email protected]
www.bartwebsites.com

Jade Elizabeth

Quote from: romuba on November 10, 2007, 02:05:51 PM
I made the change as you, Alundra, suggested but still the button shows as Website.

hold on lemme see where i changed mine
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

$txt['websiteButton_txt'] = 'Jades-World';  <found it

/Themes/default/languages/index.english.php

:D
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

romuba

Correct, that's where I changed it too, as mentioned above; "I changed it to read: $txt['websiteButton_title'] = 'St Matthew's Website';" but the tab on the forum didn't change, even after I added the / .
Ross Bartholomew
email: [email protected]
www.bartwebsites.com

Jade Elizabeth

$txt['websiteButton_txt'] = 'Jades-World';
$txt['websiteButton_title'] = 'St Matthew's Website';

well now i see the difference ;)
you edited the wrong part darls lol
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

romuba

Thanks, I will see if I can fix it...
Ross Bartholomew
email: [email protected]
www.bartwebsites.com

romuba

Alundra, there is no $txt['websiteButton_txt'] in my index.english.php file, must I add it in, and if so exactly where?
Ross Bartholomew
email: [email protected]
www.bartwebsites.com

Advertisement: