collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 551
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Thanks for having an interest with our portal. If you have any requests for features, have a look at the Feature Requests board.

Author Topic: SimplePortal 2.3.3 || SMF 1.1.13 || Can I add a picture in the navigation bar?  (Read 14245 times)

0 Members and 1 Guest are viewing this topic.

Offline sikkens1997

  • Jr. Member
  • **
  • Posts: 54
  • SMF Version: 1.1.12
  • SP Version: 2.3.3
I want to add a picture in the vavigation bar, like this:

[PIC]Home [PIC]Forums etc..

Is this possible, yes? How?

Thanks in advance
« Last Edit: March 06, 2011, 10:07:36 AM by sikkens1997 »

Offline Old Fossil

  • Beta Tester
  • *
  • Posts: 796
  • Gender: Male
  • SMF Version: 2.0.4
  • SP Version: 2.3.5
You would be better to ask at sm.org rather than here.

Even better still is the search function.
Daily backups mean less headaches

Block Set Up

I may be no coding expert but I am willing to help where I can.

I eat Spammers for breakfast

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Brack is correct that you might get more and better advice on this at SimpleMachines.org.
He is also correct that you might turn up a lot of good ideas with a search at SimpleMachines.org.
 
The short answer is yes -- you can do that. In SMF 1.1.X, you do this by customizing your theme.
It's all done in index.template.php. Search for [home]. That's where all the buttons are defined.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline sikkens1997

  • Jr. Member
  • **
  • Posts: 54
  • SMF Version: 1.1.12
  • SP Version: 2.3.3
Could you tell me how to do it?

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Sure. I don't know which theme you are using, or what images you want to put in. But I can give you general instructions you can apply to putting any image in any button for most SMF 1.1.x themes.
1) Find where the text of the button appears. In most themes, this is done with a $txt string.
2) Before that $txt string, put in the HTML for the image you want to appear.
 
To learn more about the HTML needed to show an image on a webpage, please read http://w3schools.com/html/html_images.asp or any other tutorial on HTML images.  To do this, you don't need to know much about php.  Just keep the HTML inside the single-quote delimited string. For more on string literals in php, please see http://w3schools.com/php/php_string.asp.
 
Good Luck!
 
I'm moving this topic to themes and graphics.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Old Fossil

  • Beta Tester
  • *
  • Posts: 796
  • Gender: Male
  • SMF Version: 2.0.4
  • SP Version: 2.3.5
Unfortunately the mod linked here is for the 2.0 version.

It is unknown if there is a 1.1.x version.

http://custom.simplemachines.org/mods/index.php?mod=2857
Daily backups mean less headaches

Block Set Up

I may be no coding expert but I am willing to help where I can.

I eat Spammers for breakfast

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Oh! That's a nice one.
 
sikkens1997 -- if I were in your shoes, I think I might just wait until the right time to come up to 2.0 (Final should be out quite soon) and then just install that mod.
 
 
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline sikkens1997

  • Jr. Member
  • **
  • Posts: 54
  • SMF Version: 1.1.12
  • SP Version: 2.3.3
Thanks, but I really need it for 1.1.13.  :dead:

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
You will not die if you cannot get it right away.


On the other hand, this is not too terribly difficult to do.
Please have a look at index.template.php.  Find where all the button HTML is getting written out by looking for [help]. I chose this example because it is the simplest.


Suppose you have a help icon you want to use.
Suppose it is called "help_icon.jpg", and is in your theme's images directory.
Then you could find where the word "Help" is slapped on the button and add your icon there.


Code: [Select]
<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>So what you want to do is add an image
Code: [Select]
<a href="', $scripturl, '?action=help">', $settings['images_url'], '/help_icon.jpg' , $txt[119] , '</a>

You could handle all the rest of your buttons in exactly the same way.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline sikkens1997

  • Jr. Member
  • **
  • Posts: 54
  • SMF Version: 1.1.12
  • SP Version: 2.3.3
You will not die if you cannot get it right away.


On the other hand, this is not too terribly difficult to do.
Please have a look at index.template.php.  Find where all the button HTML is getting written out by looking for [help]. I chose this example because it is the simplest.


Suppose you have a help icon you want to use.
Suppose it is called "help_icon.jpg", and is in your theme's images directory.
Then you could find where the word "Help" is slapped on the button and add your icon there.


Code: [Select]
<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>So what you want to do is add an image
Code: [Select]
<a href="', $scripturl, '?action=help">', $settings['images_url'], '/help_icon.jpg' , $txt[119] , '</a>

You could handle all the rest of your buttons in exactly the same way.

There was a problem loading the /Themes/BlackRainV2_11112/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
This means that, somewhere in there, you have made a syntax error.
Maybe I even included a syntax error in my example.


When you fix that, it will work.
If  you like, you may attach your index.template.php


You are doing this on a test forum, or at least a test theme, right?


Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline sikkens1997

  • Jr. Member
  • **
  • Posts: 54
  • SMF Version: 1.1.12
  • SP Version: 2.3.3
No. This is my 100% seriously setup site.
I will try again, since I know the error was not because of that. I'll make a copy first now  :-[

Offline sikkens1997

  • Jr. Member
  • **
  • Posts: 54
  • SMF Version: 1.1.12
  • SP Version: 2.3.3
Still getting that stupid error.

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in .../Themes/BlackRainV2_11112/index.template.php on line 485

That's the line of the Help button i edited.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Please attach  the file.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline sikkens1997

  • Jr. Member
  • **
  • Posts: 54
  • SMF Version: 1.1.12
  • SP Version: 2.3.3
Here is it.
I want to add this picture before 'Home' button:  home.png

Offline sikkens1997

  • Jr. Member
  • **
  • Posts: 54
  • SMF Version: 1.1.12
  • SP Version: 2.3.3
HELP!!

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Please attach the file you have attempted to change. the file you attached, line 485 is the "donate" button.


Whereas the home button, on line 482 is
Code: [Select]
echo '<ul><li', $current_action == 'home' ? ' id="active"' : '', '><a href="', $scripturl, '"><span>'.$txt[103].'</span></a></li>';


This does not look like you have added any code about an image.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline sikkens1997

  • Jr. Member
  • **
  • Posts: 54
  • SMF Version: 1.1.12
  • SP Version: 2.3.3
Can you please do it in the [home] button for me? It has a other code.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
You said that you tried this, but had an error. Can you please attach the file that has an error?


Thanks
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline sikkens1997

  • Jr. Member
  • **
  • Posts: 54
  • SMF Version: 1.1.12
  • SP Version: 2.3.3
I don't have the file anymore. I removed it, and I don't have a [help] button anymore aswell,
so you you please demonstrate for me in the attached file.