Main Menu
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 log in.

Who's Online

  • Dot Guests: 1250
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

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.

Icon In Block Header

Started by ccs1676, December 08, 2011, 08:55:23 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

ccs1676

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 :)

Fog

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.

ccs1676

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.

Fog

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...


Fog

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.

ccbtimewiz

You can put BBC into the actual title field of the block administration panel.

Fog

Quote from: Leekoberries on December 08, 2011, 11:52:27 PM
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.

ccbtimewiz

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.

Fog

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..

ccbtimewiz

Try this for example:

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

ccs1676


ccbtimewiz


ccs1676

Any way to disable the header completely for a block?

Fog



FrizzleFried

Quote from: Leekoberries on December 09, 2011, 12:48:23 AM
Try this for example:

[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...

ccs1676

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 :(


Fog

If you go to you index CSS and find this:

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:

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

ccs1676

thanks fog, i should have known to look at the css :)