News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Custom Tab

Started by Deprecated, September 17, 2008, 12:43:00 AM

Previous topic - Next topic

Deprecated

Could it be that you are not using the default theme? Otherwise attach your index.template.php and let me have a look see. :)

sabby

Yes, I am using the default theme. I've attached the index.template.php

Thanks

sAce

hey
can i add multiple custom tabs???

if yes , tell me how

and by the way thanks 4 developing this mod

Deprecated

Quote from: sabby on September 27, 2008, 11:49:50 PM
Yes, I am using the default theme. I've attached the index.template.php

Thanks

It is your Arcade mod that is screwing up Custom Tab's search term in your index template.

    echo ($current_action == 'arcade' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'arcade' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=arcade">' , $txt['arcade'] , '</a>
</td>' , $current_action == 'arcade' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';// How about the [search] button?


You can see how the last line the // How about the [search] button? is not on a line of it's own like it should be. It's a shame the mod author didn't check what his files look like after he's installed his mod.

Tip to mod authors: Don't submit your mod package to the SMF mod site until you've looked at each of your modified lines in all SMF files and made sure that your mod didn't screw up other lines of code not related to your mod. Your own code should blend in with the unmodified code including the same programming style (whitespace, comments, indentation, bracketing, etc.).

I've put two newlines in front of the // How about the [search] button? comment and attached your fixed file. You should be able to install Custom Tab once you upload the fixed file to your website.

Deprecated

Quote from: sbmcos on September 28, 2008, 02:58:41 AM
hey
can i add multiple custom tabs???

if yes , tell me how

and by the way thanks 4 developing this mod

You are welcome. No, this is just one tab, can be installed only once. Actually you could probably install it twice although I guarantee you won't get two tabs, and will probably crash your forum.

Just one tab. Sorry.

MultiformeIngegno

The possibility to have more than one tab will be surely appreciated... :P
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

sabby

Quote from: Deprecated on September 28, 2008, 12:42:06 PM
Quote from: sabby on September 27, 2008, 11:49:50 PM
Yes, I am using the default theme. I've attached the index.template.php

Thanks

It is your Arcade mod that is screwing up Custom Tab's search term in your index template.

    echo ($current_action == 'arcade' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'arcade' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=arcade">' , $txt['arcade'] , '</a>
</td>' , $current_action == 'arcade' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';// How about the [search] button?


You can see how the last line the // How about the [search] button? is not on a line of it's own like it should be. It's a shame the mod author didn't check what his files look like after he's installed his mod.

Tip to mod authors: Don't submit your mod package to the SMF mod site until you've looked at each of your modified lines in all SMF files and made sure that your mod didn't screw up other lines of code not related to your mod. Your own code should blend in with the unmodified code including the same programming style (whitespace, comments, indentation, bracketing, etc.).

I've put two newlines in front of the // How about the [search] button? comment and attached your fixed file. You should be able to install Custom Tab once you upload the fixed file to your website.
Worked like a charm! Thanks, I really appreciate it!!

AurielStone

Quote from: Millig on September 27, 2008, 09:28:50 AM
I too installed this for 1.1.6 but no tab to customise it showed up in the Features and Options configuration.

The mod only patches the Modifications.english.php file. If you have chosen British English or uft8 then you will need to patch the appropriate file manually.

After that it should be fine.

Augh! That damned English-utf8 thing again! *headdesk*

All right, went in and made the language files all correct. Now works fine on 1.1.6.

*goes back to thumping head on desk*

But first... to make the tab visible in *thump* fourteen *thump* freaking *thump* themes.

*thumpthumpthump*

(Great mod, Deprecated. Thank you for including the utf8 changes.)

Deprecated

I don't know what your problem is (*thump*). I already put in the UTF-8.

Let me know if there's anything I should understand about themes as they effect mod package design. If there is something I'm leaving out it might be something that could be put in.

Actually I am planning on moving on to designing themes after I get a few more "must have" mods written. "Must have" for me, but evidently some of my mods are "must have" for others too. :)

AurielStone

Quote from: Deprecated on September 29, 2008, 09:35:08 AM
I don't know what your problem is (*thump*). I already put in the UTF-8.

I know. That's why I was saying thanks. You saved me a lot of fuss and bother with that addition.

My head thumping was for having to manually edit fourteen themes on one site so that the new tab showed up properly on all of them. That part had nothing to do with you. It was just kvetching. :D

Deprecated

You're welcome. :)

I'm always trying to improve the quality of my work. I've given my mod packages the same attention and care that I give to my professional work. As I create more and more mod packages I've discovered new ways to improve them, and in most cases I've even gone back over the released packages and upgraded them to the new standards.

With regard to the UTF-8 strings, while I think there must be better ways to address it than every mod package author putting duplicate strings into their packages, I don't see any other way to do it at present so I expect to provide UTF-8 strings with all my new mod packages, and to add UTF-8 to the old packages whenever they are revised, or in some cases I might revise them just to add the UTF-8 strings.

I wish there were a better way to address the problem of getting multiple templates changed for a single mod package. At present my forums use only the default theme, but I know that one day I'll step into themes (after I've set the world right on mod packages LoL) and I know that I'll be damned annoyed if I have to make the same manual change to 14 themes.

I hope we'll have a discussion of this topic somewhere outside of my mod package support thread.

The Saviour

Deprecated...

This would be the perfect mod...if there were the ability to take existing tabs and place them in a drop down menu underneath the custom tab one has created...

Say like creating an Entertainment tab viewable to only registered members...and once clicked...a drop down menu appears with the Arcade, Chess and Chat link.  All only available for view by the registered member.

That's the only thing keeping me from uploading this to my forum at the moment...


Steve

Deprecated

That's a different modification. You'll be happy to hear that I'm thinking about writing it. I'm going to have to learn theme modifications before I tackle it. Look at it as a sort of a cross between a theme and a mod package. Let's discuss that modification in that mod's support thread when it gets written and approved.

The Saviour

Please keep me posted, my friend.  I look forward to it.

madman71

#34
Deprecated,

can you take a look at my index.temp.php?

I, too, installed it without a hitch and set for all users to see the tab, but no tab is showing.

can you plz take a look


edit: ok after making this post the default theme displays the tab, but not my custom theme.  Any advise?

Deprecated

Sure Stanley! I just love your movies! :)

It's so late and I'm really tired. Please remind me if I don't get to it. I'll get you tomorrow. :)

madman71

Quote from: Deprecated on October 13, 2008, 12:37:41 AM
Sure Stanley! I just love your movies! :)

It's so late and I'm really tired. Please remind me if I don't get to it. I'll get you tomorrow. :)

Hey Olie,

Dont forget about me today ;)

Deprecated

Wait a second, I just saw this: "edit: ok after making this post the default theme displays the tab, but not my custom theme.  Any advise?"

Yeah. Spell 'advice' correctly.

Oh... You meant SMF advice. :(

This modification installs only on your default theme. You have to edit theme templates manually. Hoping that was your theme template attached above I manually edited it to add the button.

madman71

Quote from: Deprecated on October 13, 2008, 12:49:35 PM
Wait a second, I just saw this: "edit: ok after making this post the default theme displays the tab, but not my custom theme.  Any advise?"

Yeah. Spell 'advice' correctly.

Oh... You meant SMF advice. :(

This modification installs only on your default theme. You have to edit theme templates manually. Hoping that was your theme template attached above I manually edited it to add the button.

ohh, you didnt get the memo?  Webster has changed the spelling of advice to advise  ;D


Thanks.

I'll uninstall the mod manually and reinstall it manually.  I thought that  maybe because i didnt  run into any errors while letting the Admin panel install it that it would  be fine.  Guess i was wrong ;p

QOY

I love this mod as it makes adding a tab so freakin' simple.
Thanks so much.

Is there a way I can make my tabs open in a new window, instead of the same?

Thanks!!

Advertisement: