Jump to content


Images on Categories


5 replies to this topic

#1 Ren

    Member

  • 5 posts
  • Joined: October 14, 2011
  • 1 topics
  • Age: 19
  • Skin: Modern Chrome
  • Local time: 03:32 AM
  • Zodiac:Aquarius
  • Gender:Male
  • OS:Windows 7
  • Country:
Offline
  • Time Online: 3h 30m 8s

Posted 15 October 2011 - 12:45 AM

I've been trying to put images on Categories through skin edits but the image appears to be off

Posted Image

here are the edits I did

<!-- CATS AND FORUMS -->
  <if test="cats_forums:|:is_array( $cat_data ) AND count( $cat_data )">
   <foreach loop="categories:$cat_data as $_data">
	<if test="cat_has_forums:|:is_array( $_data['forum_data'] ) AND count( $_data['forum_data'] )">
	 <div id='category_{$_data['cat_data']['id']} class='category_block block_wrap'>
										<div class="cat_img"><img src="http://site.com/image-bank/bar/{$_data['cat_data']['id']}.png" /></div>
	  <h3 id='category_{$_data['cat_data']['id']}'  class='maintitle'><a class='toggle right' href='#' title="{$this->lang->words['toggle_cat']}">{$this->lang->words['toggle_cat']}</a> <a href="{parse url="showforum={$_data['cat_data']['id']}" seotitle="{$_data['cat_data']['name_seo']}" template="showforum" base="public"}" title='{$this->lang->words['view_cat']}'>{$_data['cat_data']['name']}</a> </h3>
	  <div class='ipsBox table_wrap'>
	   <div class='ipsBox_container'>
												<table class='ipb_table' summary="{$this->lang->words['forums_in_cat']} '{$_data['cat_data']['name']}'">
		 <tr class='header hide'>
		  <th scope='col' class='col_c_icon'> </th>
		  <th scope='col' class='col_c_forum'>{$this->lang->words['cat_name']}</th>
		  <th scope='col' class='col_c_stats stats'>{$this->lang->words['stats']}</th>
		  <th scope='col' class='col_c_post'>{$this->lang->words['last_post_info']}</th>
		 </tr>


I tried to just type in the HTML in the Cat Name but there were bugs

 
 
<img>"http://sitename.com/image-bank/1.png"</img> alt="Cat Name" />

Oh and this was done on a test site

Is there a way to aling the image on the bar?

#2 Broni Re: Images on Categories

    Malware Annihilator

  • 24,883 posts
  • Joined: October 04, 2004
  • 1,860 topics
  • Age: 57
  • Skin: IPBoard wide
  • Local time: 02:32 AM
  • Zodiac:Virgo
  • Gender:Male
  • Location:Daly City, CA
  • OS:Windows Vista
  • Country:
Offline
  • Time Online: 57d 10h 30m 28s

Posted 15 October 2011 - 12:51 AM

Welcome aboard :yahooo:

Adjust in what way exactly?

I'd like see a link to a live board.

#3 Ren Re: Images on Categories

    Member

  • 5 posts
  • Joined: October 14, 2011
  • 1 topics
  • Age: 19
  • Skin: Modern Chrome
  • Local time: 03:32 AM
  • Zodiac:Aquarius
  • Gender:Male
  • OS:Windows 7
  • Country:
Offline
  • Time Online: 3h 30m 8s

Posted 15 October 2011 - 12:58 AM

I like it to appear like this

http://bakatuts.com/forum/ (My site)

see the first Category?
well under it it has '"> (Im assuming from a code) and the image won't go in to the alt text in the subforum view, that was by just entering the img through HTML in the Cat name

so in this Test board http://bakanime.x10.mx/forum/
I did through the Templets but the image goes off =[

is there anyway to make it like in my site?

#4 Broni Re: Images on Categories

    Malware Annihilator

  • 24,883 posts
  • Joined: October 04, 2004
  • 1,860 topics
  • Age: 57
  • Skin: IPBoard wide
  • Local time: 02:32 AM
  • Zodiac:Virgo
  • Gender:Male
  • Location:Daly City, CA
  • OS:Windows Vista
  • Country:
Offline
  • Time Online: 57d 10h 30m 28s

Posted 15 October 2011 - 01:31 AM

In your original forum you have unwanted code (in red):

Quote

<div class="ipsBox_container">
'"&gt;

Your code on test forum is incorrect, but it looks like it needs some work to make it correct.

First of all this image:

Quote

<img src="http://site.com/image-bank/bar/{$_data['cat_data']['id']}.png" />
has to go somewhere inside h3 brackets:

Quote

<h3 class='maintitle'>
<a class='toggle right' href='#' title="{$this->lang->words['toggle_cat']}">{$this->lang->words['toggle_cat']}</a>
<a href="{parse url="showforum={$_data['cat_data']['id']}" seotitle="{$_data['cat_data']
['name_seo']}" template="showforum" base="public"}" title='{$this->lang->words['view_cat']}'>{$_data['cat_data']['name']}</a>
</h3>
I can't tell you where exactly without an access to real board.

Then the original background has to be removed, CSS adjusted.....not 10 minutes edit.

#5 Ren Re: Images on Categories

    Member

  • 5 posts
  • Joined: October 14, 2011
  • 1 topics
  • Age: 19
  • Skin: Modern Chrome
  • Local time: 03:32 AM
  • Zodiac:Aquarius
  • Gender:Male
  • OS:Windows 7
  • Country:
Offline
  • Time Online: 3h 30m 8s

Posted 15 October 2011 - 02:39 AM

I think I got it now, I just have to adjust the maintitle bar to fit with the image now, thank you =]

#6 Broni Re: Images on Categories

    Malware Annihilator

  • 24,883 posts
  • Joined: October 04, 2004
  • 1,860 topics
  • Age: 57
  • Skin: IPBoard wide
  • Local time: 02:32 AM
  • Zodiac:Virgo
  • Gender:Male
  • Location:Daly City, CA
  • OS:Windows Vista
  • Country:
Offline
  • Time Online: 57d 10h 30m 28s

Posted 15 October 2011 - 02:54 AM

You're very welcome :smiley_says_hello:

You may want to adjust padding here:

.maintitle {


background: none repeat-x scroll center top #2C5687;
border-color: #316897;
border-radius: 4px 4px 0 0;
border-style: solid;
border-width: 1px 1px 0;
box-shadow: 0 1px 0 #528CBC inset;
color: #FFFFFF;
font-size: 16px;
font-weight: 300;
padding: 10px 10px 11px;
}





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users


This topic has been visited by 9 user(s)