Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Zetaboards Modifications
  • [SC] Recent News on Index
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
  • Pages:
  • 1
  • 2
  • …
  • 5
[SC] Recent News on Index
Tweet Topic Started: Jan 4 2009, 04:21 PM (2,615 Views)
HolySavior Jan 4 2009, 04:21 PM Post #1
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
alrighty just like how ZB has 4-5 recent topics listed in their Annoucement forum on the index. so can you with this little code!

Put this at the bottom of your board.
just edit the certain parts

Red: your forum # you want it to look in
Green: # of topics you want displayed

Quote:
 
<script type="text/javascript">
/* Recent News Topics on Index Page
Created by HolySavior of ZBCode and Javascriptin.com */
iurl = main_url+"forum/109018/",

$(".c_forum a:contains('News')").parent().parent().append("<div>Recent News: <span id='recentnews'></span></div>")
$.get(iurl,function(response) {
$(".c_cat-mark ",response).next().children("a").slice(0, 5).each(function(){
var ilinks = $(this).html();
var linkhref = $(this).attr("href");
$("#recentnews").append("[ <a href='"+linkhref +"'>" + ilinks +"</a> ] ");
});

});
</script>
Edited by Reid, Jun 15 2009, 08:21 PM.
Offline Profile Goto Top
 
lirts Jan 4 2009, 04:35 PM Post #2


Posts:
204
Group:
Member
Member
#207
Joined:
Jul 22, 2008
Coding language
HTML/CSS
I found one problem. It also takes the announcements that you make with the "New Announcement" option at the bottom of the forum view page. Any way to prevent that?
"We fear that which we do not see."

"Our minds are limited by what we know, not what we believe."
Posted Image
Legion of Shadows! Join The Community! Join The RP! Join the Legion!! Click the pic to view!

Offline Profile Goto Top
 
HolySavior Jan 4 2009, 04:55 PM Post #3
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
hmm.. ok i will fix that
Offline Profile Goto Top
 
HolySavior Jan 4 2009, 05:06 PM Post #4
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
alrighty there you go i edited my first post. it should work now.
Offline Profile Goto Top
 
PIWYRCOM Jan 4 2009, 11:21 PM Post #5
Member Avatar
PrideInWhatYouRide

Posts:
368
Group:
Member
Member
#53
Joined:
Jul 17, 2008
Coding language
None
Dan it looks like the topic at ZB just got zapped by Hazel.
obxbiker had posted this but now its gone so have been asked to find the answer here.

Here is the our boards url where the topics are not showing just the words.
http://piwyr.co.cc/index/

Code:
 

<script type="text/javascript">
/* Recent News Topics on Index Page
Created by HolySavior of ZBCode and Javascriptin.com */
iurl = main_url+"forum/371928/",

$(".c_forum a:contains('BIRTHDAY')").parent().parent().append("<div>Recent Birthdays: <span id='recentnews'></span></div>")
$.get(iurl,function(response) {
$(".c_cat-mark ",response).next().children("a").slice(0, 5).each(function(){
var ilinks = $(this).html();
var linkhref = $(this).attr("href");
$("#recentnews").append("[ <a href='"+linkhref +"'>" + ilinks +"</a> ] ");
});

});
</script>

Edited by PIWYRCOM, Jan 4 2009, 11:29 PM.
» TEST FORUM »
FIND IT HERE !
Spoiler: click to toggle

→ Infinite Results (themes)
→ ZBThemeZone (themes)

→ Big Boards (codes/themes)
→ ZBCodes (codes/themes)
→ The Coding Zone (codes/themes)

→ Code Index ('Official')
→ ZetaDoc's ('Official - How To Info')

Posted Image

Offline Profile Goto Top
 
HolySavior Jan 4 2009, 11:25 PM Post #6
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
i just visited your board and looks like its working to me.
Offline Profile Goto Top
 
PIWYRCOM Jan 4 2009, 11:29 PM Post #7
Member Avatar
PrideInWhatYouRide

Posts:
368
Group:
Member
Member
#53
Joined:
Jul 17, 2008
Coding language
None
Thanks for checking it out so quick.
This is what it shows for me using Google Chrome:

Posted Image
» TEST FORUM »
FIND IT HERE !
Spoiler: click to toggle

→ Infinite Results (themes)
→ ZBThemeZone (themes)

→ Big Boards (codes/themes)
→ ZBCodes (codes/themes)
→ The Coding Zone (codes/themes)

→ Code Index ('Official')
→ ZetaDoc's ('Official - How To Info')

Posted Image

Offline Profile Goto Top
 
HolySavior Jan 4 2009, 11:32 PM Post #8
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
hmm..
i wonder is chrome has issues with it.
Offline Profile Goto Top
 
Invisible Mann Jan 6 2009, 02:27 PM Post #9
Member Avatar


Posts:
11
Group:
Member
Member
#6
Joined:
Jun 11, 2008
Mine is displaying the correct topics from the right forum, but they are showing up on the complete wrong forum.
Posted Image

Join Zetaboard's Most Unique & Fun Entertainment Forum
Offline Profile Goto Top
 
HolySavior Jan 6 2009, 03:11 PM Post #10
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
hmm... link to your board numark. it should be just the If statment where the forum name in it.

should be a very quick fix.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Zetaboards Modifications · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2
  • …
  • 5

Track Topic · E-mail Topic Time: 7:49 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy