News:

Wondering if this will always be free?  See why free is better.

Main Menu

How To Create Custom Pages + Tabs [2.0 RC3]

Started by IceXaos, September 28, 2010, 11:37:45 AM

Previous topic - Next topic


Computer Robot

How can I modify this to point to a parent directory.  I just want a button to go to the home page of my website but the forum folder is in a subdirectory of the homepage.  ie http://www.homepcrepairsandupgrades.co.uk/forum/

I added the first 2 steps from the original post to make a "Home Page" tab after Home but its not directed to anything. 

Computer Robot

The new tab is actually directed to the forum home page.  I think this is because I change the "mypage" into "home page" somewhere in the code and its calling that function.  What I want though is to go to http://www.homepcrepairsandupgrades.co.uk/  a parent directory of my forum. 

IceXaos

Quote from: Computer Robot on December 08, 2010, 12:30:18 PM
The new tab is actually directed to the forum home page.  I think this is because I change the "mypage" into "home page" somewhere in the code and its calling that function.  What I want though is to go to http://www.homepcrepairsandupgrades.co.uk/  a parent directory of my forum. 
Is the "homepage" your linking to off-site, or is it the actual homepage of the forum?  If it's off-site, you will not need to do the 2nd part of step 2.  Now, you can name the action whatever you like as long as it's not taken, simply set the title to what you'd like it to say and the href to the link you just said.  If you end up lost, let me know and I can help you over teamviewer and show you how, or I can modify it for you and send it back.

Computer Robot

HI thanks it worked.  I tried to change the 'Home' button to 'Forum Home'  so I could give my homepage that title but it shrank the button to minimal width and no text.  I then removed the $txt from the code and it went back to normal.  Shouldn't be a problem should it?

Hj Ahmad Rasyid Hj Ismail

IMO, if you follow the OP correctly, then you will realized that there is no need to put $txt as that is used only if you want to call the menu from language file.

Computer Robot

Quote from: ahrasis on December 09, 2010, 05:07:52 AM
IMO, if you follow the OP correctly, then you will realized that there is no need to put $txt as that is used only if you want to call the menu from language file.

Sorry dont know what that means being a noob.  I will point out though that I changed one of the original buttons installed along with the forum i.e the HOME tab. 

IceXaos

When you use, for example $txt['home_tab'] you are calling on the language file where that variable is defined.  There is no reason to define them in the language file unless you're anal, in which you could also create a template file rather than stick everything inside of the source file.

Rather than use something like $txt['home'] just use 'home'.

radioz

IceXaos,

Could your step #2 be used for an image?  I have managed to change the smflogo and move it to the left.I would like to link that image to the home page of my external main website.  I am using a veryy slightly modified (logo) Curve theme,

Thanks!

Jon

IceXaos

Quote from: radioz on December 10, 2010, 07:37:50 AM
IceXaos,

Could your step #2 be used for an image?  I have managed to change the smflogo and move it to the left.I would like to link that image to the home page of my external main website.  I am using a veryy slightly modified (logo) Curve theme,

Thanks!

Jon
If you're wanting a regular image linked to another page, you would simply use HTML code.
<a href="http://...."><img src="http://.../*.jpg"></a>

Or, did you mean you wanted to add an image to the drop-down menu?  If so, did you mean add an icon, or a small banner?

advance

I've got a different question. I want to make a button ( and sub buttons ) that direct to the pages on another server but those pages need to be rendered inside forum, not in new page/window.

Sorry for my english :).

Regards.

IceXaos

Quote from: advance on December 13, 2010, 07:16:45 AM
I've got a different question. I want to make a button ( and sub buttons ) that direct to the pages on another server but those pages need to be rendered inside forum, not in new page/window.

Sorry for my english :).

Regards.
There are two ways you can go about doing this, but if you have many questions, please make a thread in the coding support for more information.

You could go about it using Javascript/JQuery using a new page like this and only inserting a div into the page, which can contain data by default and will be changed as you choose different links (which would link to use JQuery, not a URL).

Alternatively, you could use an iFrame on the page, and this should be pretty self-explanatory.

Good luck.

Hack-King


IceXaos


lucas-ruroken

Adk Portal 3.1 is coming....

Design your universe!

IceXaos

Quote from: lucas-ruroken on January 03, 2011, 01:05:17 AM
so.. good tip
:) Figured it may be of use as it's something that took me a little to figure out when I first started using SMF.  For me, the problem was finding everything, but this should cover people who don't really know PHP, and those who need help locating things.

Almost 3K views .. :P

lucas-ruroken

Adk Portal 3.1 is coming....

Design your universe!

Hj Ahmad Rasyid Hj Ismail

Quote from: IceXaos on January 03, 2011, 12:48:58 PM
Quote from: lucas-ruroken on January 03, 2011, 01:05:17 AM
so.. good tip
:) Figured it may be of use as it's something that took me a little to figure out when I first started using SMF.  For me, the problem was finding everything, but this should cover people who don't really know PHP, and those who need help locating things.

Almost 3K views .. :P
IX - This thread is indeed useful. Plus your avatar and sig pic might be distracting them too  8)

inter

Excuse for my English. :P

Thanks for this instruction, but are necessary for me more information how to make that a page title was added in a menu tree?

How to make on this page subpage in which scenarios were fulfilled:

http://myforum/index.php?action=mypage;sa=?;in=?;?=?;...

Sorry for my English

Advertisement: