1
cre8d
Changing the New Topic image
  • 2004/6/27 3:00

  • cre8d

  • Just popping in

  • Posts: 29

  • Since: 2004/6/13


I'd like to change the default "New Topic" image to simply be text. What's the best way to do this?

2
tl
Re: Changing the New Topic image
  • 2004/6/27 3:06

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


Could you elaborate on what you meant by "simply be text"? Are you replacing the image with text or replacing the image with another image with just text on it?

[edit] first case, it might mess up your story text or something like
Topic
Content text

second case, you will have to create your own image files.
[/edit]

3
tjnemez
Re: Changing the New Topic image
  • 2004/6/27 3:18

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


make a .gif to match your text and background and then overwrite "new topic" with new image. upload and update your site through system admin.

4
cre8d
Re: Changing the New Topic image
  • 2004/6/27 3:23

  • cre8d

  • Just popping in

  • Posts: 29

  • Since: 2004/6/13


I want to switch from having an image that says "New Topic" to text saying "New Topic" (I don't want to create a new image).

5
tjnemez
Re: Changing the New Topic image
  • 2004/6/27 3:33

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


not a simple task, what is the reasoning?

6
tl
Re: Changing the New Topic image
  • 2004/6/27 3:36

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


The code renders the news by template file news_item.html
<div class="itemBody">
[
color=d84848] <{$story.imglink}>[/color]
    <
class="itemText"><{$story.text}>p>
  div>


If you want to replace <{$story.imglink}>, you would have to modify the index.php file and/or change the aforementioned template codes.

A question for you - the top title already has the topic name, why do you want to add another one in it?


7
cre8d
Re: Changing the New Topic image
  • 2004/6/27 3:48

  • cre8d

  • Just popping in

  • Posts: 29

  • Since: 2004/6/13


Sorry if I'm not making myself clear:

I want to replace this code:



with this code:

New topic

8
cre8d
Re: Changing the New Topic image
  • 2004/6/27 3:50

  • cre8d

  • Just popping in

  • Posts: 29

  • Since: 2004/6/13


My reasoning being that I want my site to be as lightweight as possible and I don't see a reason why a "New topic" link should be displayed as an image. I'd rather it was a text link...

9
tl
Re: Changing the New Topic image
  • 2004/6/27 4:14

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


Now we are going somewhere. Sorry I didn't quite get what you want.

You will have to modify the following file

newbb/viewforum.php
$xoopsTpl->assign("forum_id"$forum);
if ( 
$can_post == ) {
$xoopsTpl->assign('viewer_can_post'true);
$xoopsTpl->assign('forum_post_or_register'"newtopic.php?forum=".$forum."">
[color=d84848]$bbImage['post']."" alt=""._MD_POSTNEW."" />[/color]");
} else {
$xoopsTpl->assign('viewer_can_post'false);
if ( 
$show_reg == ) {
$xoopsTpl->assign('forum_post_or_register''.XOOPS_URL.'/user.php?xoops_redirect=
'
.htmlspecialchars($xoopsRequestUri).'">'._MD_REGTOPOST.'');
    } else {
$xoopsTpl->assign('forum_post_or_register'"");
    }
}


replace the highlighted code with text New Topic

Backup the file first before you try to modify the file, so you have a file to fall back if something goes wrong.

10
cre8d
Re: Changing the New Topic image
  • 2004/6/27 4:18

  • cre8d

  • Just popping in

  • Posts: 29

  • Since: 2004/6/13


Ahh you are wonderful! Many thanks for that - it worked perfectly.

Login

Who's Online

296 user(s) are online (221 user(s) are browsing Support Forums)


Members: 0


Guests: 296


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits