Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
How to remove the word "topic" in newest topics tag PHP raw code?
Avatar
Robert Lawrence
Member
Free Members
sp_UserOfflineSmall Offline
Mar 2, 2013 - 6:44 pm

Hi, I am using the php code below to show the recent topics in my forum and the word "topic" is showing before each topic.  How do I exclude this word "topic" and have nothing show up before each item.

 

<?php sp_NewestTopicsTag(

'itemOrder=T&&limit=10&afterDate=<hr/>'

);?>
 
 
Avatar
Robert Lawrence
Member
Free Members
sp_UserOfflineSmall Offline
Mar 2, 2013 - 6:50 pm

This forum is not letting me past in the raw code and keeps making it look weird.    Basically, I just want to know how to remove the word "topic" from the recent forum topics list and show just the title with links to the topics. 

You can see the page reference this here: http://codex.simple-press.com/.....st-topics/

Avatar
Robert Lawrence
Member
Free Members
sp_UserOfflineSmall Offline
Mar 2, 2013 - 7:08 pm

<!--?php sp_NewestTopicsTag('itemOrder=FTAUD&&limit=10&afterDate=<hr?-->I know this can be easily done using the recent posts widget but I am creating a static page and need to embed the last 10 recent topics using php code (without the word "topic" showing before each item.

I tried again to paste code in this message to show you but it's getting all jumbled up and won't let me.

 

Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Mar 2, 2013 - 7:58 pm

You would use the "beforeTopic" argument with nothing after the equals sign. The default is "Topic"

So something like:  itemOrder=FTAUD&limit=10&beforeTopic=&afterDate=<hr />

Also in your post above, although it's jumbled, I am seeing 2 ampersands in a row && before limit. It should only be one.

 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 2, 2013 - 8:00 pm

to enter code,  paste the code, highlight it, and use the code highlight button... looks like ${}

Avatar
Robert Lawrence
Member
Free Members
sp_UserOfflineSmall Offline
Mar 2, 2013 - 8:34 pm

 

This is what I have, and it is still showing the word "Topic" before each line.  Also, it is just showing 5 items and not 10 as I set my limit to.  Not sure what's going on here.  Something is not right with my code or maybe the tag is not functioning properly?

<?php

 sp_NewestTopicsTag('itemOrder=T&limit=10&beforeTopic=&afterDate=<hr/>');

?>

Avatar
Robert Lawrence
Member
Free Members
sp_UserOfflineSmall Offline
Mar 2, 2013 - 8:36 pm

 

<?php

 sp_NewestTopicsTag('itemOrder=T&limit=10&beforeTopic=&afterDate=<hr/>');

?>

Avatar
Robert Lawrence
Member
Free Members
sp_UserOfflineSmall Offline
Mar 2, 2013 - 8:38 pm

Ok the past code thing isn't working for me.  Keeps jumbling up the php open and closing brackets but the middle is what I have.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 2, 2013 - 9:18 pm

please follow the directions I gave you before...

paste your code into the post highlight the code you just pasted go to the code highlight button - looks like ${}

it will maintain the code formatting...

Avatar
Robert Lawrence
Member
Free Members
sp_UserOfflineSmall Offline
Mar 2, 2013 - 10:17 pm

 

<?php sp_NewestTopicsTag('itemOrder=T&limit=10&beforeTopic=&afterDate=');?>
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625