Log in

View Full Version : Zajako's News Hack


zajako
11-13-2002, 10:00 PM
This hack lets you make any page you want have the first post of your x amount of threads in the forum you choose, which is bassicaly a news feed. What makes mine different from any others is first its alone and not attached to anythign else.

2nd you can do it on any page that calls the global page, including non vb pages.

3rd it uses a single template that allows you to show anything in your postbit for each of the threads an example is to output your news using your default postbit for your threads, which is similar to what the one that is default does.

I hope you guys find it useful and also i want to point out theh template included should be changed. It uses the postbit that is default to vb, and shows all the details of a normal post including the links to profile and all that stuff its merely of an example at what it can do. I also plan to update this in the uture to contain coments type of links and numbers to make it more like a news displayer.

Anyways i hope it works well. for all of you

For a demo board here is one of my sites i have installed it on.

www.therpgia.com



Here is the updated file

Zajako's News Hack (https://vborg.vbsupport.ru/attachment.php?s=&postid=322193)

zajako
11-14-2002, 06:41 AM
heres a screenshot

lalo landa
11-14-2002, 06:59 AM
cool... can u show us some live demo?

Asso
11-14-2002, 10:49 AM
nice but useful? :)

thx!

kmfdm_kid2000
11-14-2002, 10:51 AM
Umm, I kinda still don't get it...It shows up on the top of the post bit or something?? Please elaborate a little??

zajako
11-14-2002, 11:51 AM
it shows the first post of every thread in a specific forum. Just like news hacks do. Thats because it is a news hack. You can limit the totla threads shown as well.

Very useful for making your news showwn on your webiste pages.

zajako
11-14-2002, 12:06 PM
i would show a demo, however, my site that uses it is not released to the public yet

zajako
11-14-2002, 01:03 PM
as with most betas this was no exception, i messed up a ton of things. Here is the fix for the bugs as well as a minor update of a few otehr things.

just download the new files, and then run the update script in the newsinstall.php file. THen recopy the functions.php text. then recopy the new text for the news getting process. Final step is to set the max number of characters before it cuts off the text via the adminpanel.

assassingod
11-14-2002, 02:20 PM
So basically like the announcments feature already in vBulletin? :confused:

zajako
11-14-2002, 04:21 PM
no, its made mainly for non vb pages, to display the "News" which can be non site related but on the fourms in a thread itself.

MoonSlasher
11-14-2002, 04:23 PM
I was wondering what kind of news script I would use for my site, sice I'm not allowed to use newspro anymore >_<
Maybe I'll try this out, thanks AGAIN for making a great hack :D

zajako
11-14-2002, 04:27 PM
Heres a better newsbit to work with. A little less liek a post, and a bit more like news. Has a comment link as well as a cut off link for text extending the limit of characters.




<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="100%">
<tr id="cat">
<td align=left width="50%" bgcolor="{categorybackcolor}" ><normalfont>$article[icon] <a href="$bburl/showthread.php?s=$session[sessionhash]&threadid=$post[threadid]"><b>$post[icon] $post[title]</b></a><normalfont></td>
<td align=right width="50%" bgcolor="{categorybackcolor}">
<normalfont><b>$post[username]</b></normalfont>
<font size=1><i>$post[usertitle]</i></font>
</td>
</tr>
<tr>
<td colspan="2" >
<table bgcolor="{pagebgcolor}" width="{tablewidth}" cellpadding="0" cellspacing="0" border="0"><tr><td width="10"><img width="10" height="1" src="{imagesfolder}/space.gif" alt=""></td><td width="100%"><!-- spacer -->

<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center" ><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr>
<td bgcolor="$post[backcolor]" width="175" valign="top" nowrap>
<a name="post$post[postid]"></a>
$post[firstnewinsert]
$post[avatar]
</td>

<td bgcolor="$post[backcolor]" width="100%" valign="top">

<p><normalfont>$post[message] <br><div align=center><a href="$bburl/showthread.php?threadid=$post[threadid]">[Read Full Article]</a></normalfont></div></p>


</td>
</tr>
<tr>
<td bgcolor="$post[backcolor]" width="175" height="16" nowrap><smallfont>$post[foldericon]
$post[postdate] <font color="{timecolor}">$post[posttime]</font></smallfont></td>

<td bgcolor="$post[backcolor]" width="100%" valign="middle" height="16">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="bottom">
<td><smallfont>$onlinestatus
$post[profile] $post[pmlink] $post[useremail] </smallfont></td><td align=center><smallfont><a href="$bburl/newreply.php?threadid=$post[threadid]">>>Comment<<</a></td>
</smallfont>
<td align="right" nowrap><smallfont>
<a href="$bburl/editpost.php?s=$session[sessionhash]&action=editpost&postid=$post[postid]"><img src="{imagesfolder}/edit.gif" border="0" alt="Edit/Delete Message"></a>
<a href="$bburl/newreply.php?s=$session[sessionhash]&action=newreply&postid=$post[postid]"><img src="{imagesfolder}/quote.gif" border="0" alt="Reply w/Quote"></a>
</smallfont></td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr></table>

<!-- spacer --></td><td width="10"><img width="10" height="1" src="{imagesfolder}/space.gif" alt=""></td></tr></table>
</td>
</tr>
</table>
<br>

assassingod
11-14-2002, 08:09 PM
Ah - I get it now. Looks Cool! Thanks zajako

Velocd
11-15-2002, 04:09 AM
Very interesting concept, to show the first post in each thread of every forum.

But, would it make more sense to show the latest post of each thread in every forum? Maybe not..since viewers wouldn't be keened in on the topic, but then again..who knows?

Well, nifty idea of a hack, but I'll have to consider whether I need it or not.

blackice912
11-15-2002, 08:42 AM
I like! :) I'll probably use this for some interesting reason...heh

zajako
11-16-2002, 04:16 AM
Velocd, i don't think you understand it. It is for displaying news. The news post is shown, and lets your members read it on another page, and then they can clikc a link to lead to the forum so they can comment on the news. For example you have a forum called site news. then you have a main site page. You can use this hack to display the news thread's first post listing off the current news. Thus any comments or replies about the news would not matter nor want to be shown.

Trident
04-03-2003, 04:03 PM
sory for bump

i want only titles of the news , also i want it as columns like :

news1 | news2 | news3

any one help me please ?

Zachery
05-18-2003, 06:27 AM
if your looking for a live demo i belive that he has also installed it at his website www.tfogame.com

kaotic
05-28-2003, 04:05 AM
Zajako just sent me an update to this hack. I'm attaching it with his permission. The instructions should be self-explanatory, but I don't believe that you need to make any changes to admin/functions.php or the template.