News:

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

Main Menu

Help Topic Gif

Started by ManOfBliss, June 06, 2012, 12:33:51 AM

Previous topic - Next topic

ManOfBliss

One thing I like about the SM admin area is that it has the little Help Topic gif
which opens a tiny pop up page with information.

I want to place one of these in a key part of my forum, to answer questions,
does anyone know what the string of code is?

kat

I'd assume it's all in the default theme's Admin.template.php

I just had a look through it and it sure looks like it is. :)

If you search "Help", in the file, you'll see what's done.

It's rather more than just a simple string of code, though. ;)

Arantor

Nothing to do with Admin.template.php, requires two separate things to occur in order for it to work.

Firstly, you have to add it to the template:

<a href="yourforum.com/index.php?action=helpadmin;help=text_id" onclick="return reqWin(this.href);" class="help"><img src=yourforum.com/Themes/themename/images/helptopics.gif" alt="Help"></a>

The stock code uses $scripturl to point to the correct index.php and $settings['images_url'] to point to the proper helptopics.gif, plus $txt['help'] to point out the correct language for 'Help'

Then you see the text_id part, that's the entry in Help.language.php, $helptxt, to point to the correct text. E.g. the prompt next to the admin login theme is securityDisable_why, so it gets the URL of index.php?action=helpadmin;help=securityDisable_why and $helptxt['securityDisable_why'] in Help.language.php.

kat

Again, I bow to your superior knowledge.

I actually understood a little bit of what you posted, too. :)

Only the English, though. :(

Advertisement: