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: 744
  • 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]

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: Icon In Block Header  (Read 9744 times)

0 Members and 1 Guest are viewing this topic.

Offline ccs1676

  • Semi Newbie
  • *
  • Posts: 29
  • SMF Version: 2.0
  • SP Version: 2.3.4
Icon In Block Header
« on: December 08, 2011, 08:55:23 PM »
I would like to place an image inside a block header, in place of or next to the title, like so:



What do I need to edit? I'll be working on it unless someone posts first, thanks :)

Offline Fog

  • Jr. Member
  • **
  • Posts: 79
  • Gender: Male
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Re: Icon In Block Header
« Reply #1 on: December 08, 2011, 09:24:41 PM »
For Blocks, I'd start on the PORTAL TEMPLATE PHP

From there I'd try to find how they display the name of the block or the gif that allows you to collapse the block.

That should allow you to subsitute an image of you choice.

Have you tried putting that image where you name the block?

It works with Catagories.

Offline ccs1676

  • Semi Newbie
  • *
  • Posts: 29
  • SMF Version: 2.0
  • SP Version: 2.3.4
Re: Icon In Block Header
« Reply #2 on: December 08, 2011, 10:00:46 PM »
I found the snippet in portal.template.php where the gif for the block collapse is. But any kind of editing there will affect all blocks, so there must be another way to change separate blocks by their id number or something. That is where I am...

Hmmm yeah I never saw that option for using an image for a category. Not sure if I have seen an option for that with simple portal.

Offline Fog

  • Jr. Member
  • **
  • Posts: 79
  • Gender: Male
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Re: Icon In Block Header
« Reply #3 on: December 08, 2011, 10:27:46 PM »
Yes that would be true each block header would have the same icon...

If you're looking for a unique icon for each block..

Look at the INFO CENTER at the bottom of the forum...on the left hand side you have an icon for several different fuctions...

I wish I had a screen shot...


Offline Fog

  • Jr. Member
  • **
  • Posts: 79
  • Gender: Male
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Re: Icon In Block Header
« Reply #4 on: December 08, 2011, 10:42:44 PM »
Off subject a bit, On your test site try inserting a html image code where you name the board.

The only problem is that image shows up in you menu tree.

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Icon In Block Header
« Reply #5 on: December 08, 2011, 11:52:27 PM »
You can put BBC into the actual title field of the block administration panel.

Offline Fog

  • Jr. Member
  • **
  • Posts: 79
  • Gender: Male
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Re: Icon In Block Header
« Reply #6 on: December 09, 2011, 12:11:30 AM »
You can put BBC into the actual title field of the block administration panel.

Perfect timing

I didn't think of that but if that is an option then one could create a different icon for each block instead of modifying any PHP code.

Basically what we're doing is replacing Normal Text we name a board or a block with either a html or a bbc code.

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Icon In Block Header
« Reply #7 on: December 09, 2011, 12:35:53 AM »
It's possible to do this without editing any code or template file, as parse_bbc is already being called on the variable that passes the title of the block.

Offline Fog

  • Jr. Member
  • **
  • Posts: 79
  • Gender: Male
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Re: Icon In Block Header
« Reply #8 on: December 09, 2011, 12:46:30 AM »
Could one create an ICON then Text within the header?

Meaning

< img source   or [img then have the block name in text after the icon..

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Icon In Block Header
« Reply #9 on: December 09, 2011, 12:48:23 AM »
Try this for example:

Code: [Select]
[img]http://simpleportal.net/Themes/mehmene/images/icons/profile_sm.gif[/img] User Profile

Offline ccs1676

  • Semi Newbie
  • *
  • Posts: 29
  • SMF Version: 2.0
  • SP Version: 2.3.4
Re: Icon In Block Header
« Reply #10 on: December 09, 2011, 04:33:24 PM »
Works great!! Thank you!!

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Icon In Block Header
« Reply #11 on: December 09, 2011, 04:50:38 PM »
You're welcome. ;)

Offline ccs1676

  • Semi Newbie
  • *
  • Posts: 29
  • SMF Version: 2.0
  • SP Version: 2.3.4
Re: Icon In Block Header
« Reply #12 on: December 09, 2011, 08:22:04 PM »
Any way to disable the header completely for a block?

Offline Fog

  • Jr. Member
  • **
  • Posts: 79
  • Gender: Male
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Re: Icon In Block Header
« Reply #13 on: December 09, 2011, 09:03:56 PM »


Click on "No Title"

Offline ccs1676

  • Semi Newbie
  • *
  • Posts: 29
  • SMF Version: 2.0
  • SP Version: 2.3.4
Re: Icon In Block Header
« Reply #14 on: December 10, 2011, 08:29:56 PM »
Thank you :)

Offline FrizzleFried

  • Full Member
  • ***
  • Posts: 114
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Icon In Block Header
« Reply #15 on: April 06, 2012, 04:36:39 PM »
Try this for example:

Code: [Select]
[img]http://simpleportal.net/Themes/mehmene/images/icons/profile_sm.gif[/img] User Profile

This works pretty good... but the ICON isn't centered... but rather the bottom of the icon matches the bottom of the text so if the icon is larger than 12x12 it looks funky.  Is there any way to adjust the VERTICAL POSITIONING of the icon?  I'd love to set up some 20x20 icons but using the code above the icon sticks way high...

Offline ccs1676

  • Semi Newbie
  • *
  • Posts: 29
  • SMF Version: 2.0
  • SP Version: 2.3.4
Re: Icon In Block Header
« Reply #16 on: December 29, 2012, 10:45:07 AM »
I can't seem to remove the background in the header for my block. I got the image loaded ok though. My forum was down for a year and now back up and I just can't seem to remember how to do it :(


Offline Fog

  • Jr. Member
  • **
  • Posts: 79
  • Gender: Male
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Re: Icon In Block Header
« Reply #17 on: December 29, 2012, 02:07:37 PM »
If you go to you index CSS and find this:

Code: [Select]
div.cat_bar
{
background: url(../images/theme/main_block.png) repeat-x 0 0px;
padding-left: 20px;
height: 31px;
overflow: hidden;
margin-bottom: 1px;
}

and change it to your liking such as this:

Code: [Select]
div.cat_bar
{
background: #000000;
padding-left: 20px;
height: 31px;
overflow: hidden;
margin-bottom: 1px;
}

That will get rid of the blue part you see and give it a black bar instead.  Of course you can choose what ever color you want.  Also what you can do is change up the padding-left from 20px to 0px and your image will cover up the blue part as well

Offline ccs1676

  • Semi Newbie
  • *
  • Posts: 29
  • SMF Version: 2.0
  • SP Version: 2.3.4
Re: Icon In Block Header
« Reply #18 on: December 29, 2012, 03:10:01 PM »
thanks fog, i should have known to look at the css :)