vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Zajako's News Hack (https://vborg.vbsupport.ru/showthread.php?t=45714)

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.

PHP Code:



<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextrawidth="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}" {tableouterextrawidth="{contenttablewidth}" align="center"  ><tr><td>
<
table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextrawidth="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.


All times are GMT. The time now is 06:14 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01142 seconds
  • Memory Usage 1,779KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete