TinyPortal

Development => Support => Topic started by: clickbouyow on August 03, 2008, 07:43:12 PM

Title: Remove Article Icons?
Post by: clickbouyow on August 03, 2008, 07:43:12 PM
Link to my site: http://www.deadboneplatoon.com/startrek/
SMF version: SMF ver. 1.1.5
TP version: TP ver. 1.0.5
Theme name and version: Enterprise TP
Mods installed: Gallery Lite
Related Error messages: N/A

I want to remove the article ICON and have the article centered.  See attached image.


Title: Re: Remove Article Icons?
Post by: Phil Serna on August 03, 2008, 08:01:23 PM
have you checked your options for what you want to appear when you create a article?
Title: Re: Remove Article Icons?
Post by: clickbouyow on August 03, 2008, 11:41:54 PM
Quote from: Phil Serna on August 03, 2008, 08:01:23 PM
have you checked your options for what you want to appear when you create a article?

Yes.  there is no option for none.
Title: Re: Remove Article Icons?
Post by: IchBin on August 04, 2008, 01:29:56 AM
What article icon are you talking about? I don't see one in your image.
Title: Re: Remove Article Icons?
Post by: clickbouyow on August 04, 2008, 02:47:36 AM
It is there, however it is transparent.  There is no way to select none.   If you notice, the block is off center.  It is caused by the "blank" image in the upper right corner.
Title: Re: Remove Article Icons?
Post by: Phil Serna on August 04, 2008, 03:23:57 AM
I don't even see what your talking about on your site.
Title: Re: Remove Article Icons?
Post by: JPDeni on August 04, 2008, 03:55:55 AM
I removed the article icons on my site, but I can't remember how I did it. However, you should be able to achieve what you want by using a top block without any frame or title.
Title: Re: Remove Article Icons?
Post by: clickbouyow on August 04, 2008, 12:23:20 PM
Quote from: Phil Serna on August 04, 2008, 03:23:57 AM
I don't even see what your talking about on your site.

If you look at the attached image, you will see that the article is misaligned.  It is misaligned because of a transparent icon for articles that is placed in the upper left corner.

Quote from: JPDeni on August 04, 2008, 03:55:55 AM
I removed the article icons on my site, but I can't remember how I did it. However, you should be able to achieve what you want by using a top block without any frame or title.

Wouldn't that defeat the purpose of articles?

Title: Re: Remove Article Icons?
Post by: JPDeni on August 04, 2008, 02:19:55 PM
QuoteWouldn't that defeat the purpose of articles?

No, I don't think so. I'm not saying that you should not use articles at all on your site. I'm only suggesting that you use a block in this particular case. I consider the point of articles to be the creation of whole custom pages. In this case, you're just using it as a block. It is simpler to actually use a block than it is to figure out how to alter the coding to eliminate the icon.

Another thing that might help is to make that transparent icon smaller. You can create an image that is only 1 pixel by 1 pixel.

Or, since you aren't using a title or anything in this article, just de-select "Display top" in the article's options.
Title: Re: Remove Article Icons?
Post by: clickbouyow on August 04, 2008, 02:53:14 PM
I did create a 1x1 pixel.  Same problem.  I de-selected "Display Top" at the time I created the article.
Title: Re: Remove Article Icons?
Post by: clickbouyow on August 04, 2008, 03:04:46 PM
I tried a top block.  It does not stay within the confines of the right and left panel.  An upper block works, however there is not as much flexibility as with an article (background color, etc).  Also, it creates deadspace at the top and I can't figure out why.  All that is in the block is a table.
Title: Re: Remove Article Icons?
Post by: JPDeni on August 04, 2008, 03:21:29 PM
Then try putting into a block.
Title: Re: Remove Article Icons?
Post by: clickbouyow on August 04, 2008, 03:32:18 PM
I did.  I would prefer the flexibility of an article.  All I want to do is remove the icon. 
Title: Re: Remove Article Icons?
Post by: JPDeni on August 04, 2008, 03:38:26 PM
I understand and it would probably be better if the use of an icon was optional from within TP. But it isn't.

It was a long time ago when I set up my site and eliminated the icon. I don't remember what I did. Knowing the way I do things, I likely went through the code and started eliminating anything that looked like code to print out an icon, checking after each change, until the icon disappeared.

If you want, I'll spend some time trying to find it, after I write the code for the other two people that I've promised code to.
Title: Re: Remove Article Icons?
Post by: IchBin on August 04, 2008, 06:04:11 PM
I'm not sure where, but I'm pretty sure it would be in the TPortal.template.php file. That would be my guess on where to start. :)
Title: Re: Remove Article Icons?
Post by: JPDeni on August 04, 2008, 06:39:25 PM
I found it.

Open TPortal.template.php. Find


&nbsp;&nbsp;<img src="' , $settings['tp_images_url'] , '/TPxx.gif" alt="" />&nbsp;&nbsp;<a href="' , $story['href'] , '">' , $story['subject'] , '</a>


Change it to


<a href="' , $story['href'] , '">' , $story['subject'] , '</a>


It's in two places. If you're sure you'll never want the icons, take them out in both places.

It would probably be best to save this to your own theme directory and leave the one in the default directory alone.
Title: Re: Remove Article Icons?
Post by: clickbouyow on August 05, 2008, 12:05:55 AM
Well, it removes the icon, but the it leaves the column, so the article is still off-center.  Thanks for finding that, though.
Title: Re: Remove Article Icons?
Post by: JPDeni on August 05, 2008, 12:30:26 AM
Then there's something in the theme you're using that's making it off-center, because it's not off-center when I use it with the default theme.
Title: Re: Remove Article Icons?
Post by: clickbouyow on August 05, 2008, 01:22:47 AM
Quote from: JPDeni on August 05, 2008, 12:30:26 AM
Then there's something in the theme you're using that's making it off-center, because it's not off-center when I use it with the default theme.

I don't see how.  There is no code in the index.template.php for articles or for icons with Enterprise_tp and there is no custom TPortal.template.php for it.  So the code must be in TPortal.template.php or some other TP file. 

Even with the modifications, TP attempts to put a column with an ICON in the article.  This icon is a category icon.  See attached image.
Title: Re: Remove Article Icons?
Post by: JPDeni on August 05, 2008, 03:27:06 AM
Try this then...

In TPortal.template.php, there are three places that say


// any category icon?
if(!empty($story['category']))
$render .= $story['category'];


Try deleting those.

Look for things that might be the source of what you don't like, delete those things and see what happens.
Title: Re: Remove Article Icons?
Post by: clickbouyow on August 05, 2008, 10:08:48 PM
Quote from: JPDeni on August 05, 2008, 03:27:06 AM
Try this then...

In TPortal.template.php, there are three places that say


// any category icon?
if(!empty($story['category']))
$render .= $story['category'];


Try deleting those.

Look for things that might be the source of what you don't like, delete those things and see what happens.

That did it.  Line 511.  Removed

// any category icon?
   if(!empty($story['category']))
      $render .= $story['category'];

And the column went away.  Thanks for your help!!
Title: Re: Remove Article Icons?
Post by: adamcanada on October 22, 2008, 04:17:46 AM
I seem to be having this same problem, I am trying to use the fix in this thread but cannot for the life of me find the TPortal.template.php file.

Any ideas? I am using the DarkBreak theme
Title: Re: Remove Article Icons?
Post by: IchBin on October 22, 2008, 04:23:33 AM
If any theme does not have a template file, it automatically uses the file found in the default theme.