Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-25-2001, 03:54 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are responsible for this

http://www.eaforums.com/t6418.html

I had to dig long and hard to find it, but it's your hack.

Amy
Reply With Quote
  #2  
Old 11-25-2001, 04:04 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's my hack? :stupid:

Wait... let me guess. It's a very modified version of something I posted a long time ago, to change the look of the first post in a thread?

Thanks.
Reply With Quote
  #3  
Old 11-25-2001, 04:18 PM
Hooper's Avatar
Hooper Hooper is offline
 
Join Date: Oct 2001
Location: St. Louis, Mo
Posts: 286
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uhh Amy,

What hack is this? I wouln't mind trying this one out. Actually if it's heavily modified I wouldn't mind trying your version out.

Thanks
Reply With Quote
  #4  
Old 11-25-2001, 04:40 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the only modification I made is to hardcode in the specifc forums that the hack should apply to. Oh, and I also passed the thread id to the function so that my comment link in the first post would work.

Here's the link Hooper:

http://vbulletin.com/forum/showthrea...ght=first+post

Amy
Reply With Quote
  #5  
Old 11-25-2001, 04:47 PM
Hooper's Avatar
Hooper Hooper is offline
 
Join Date: Oct 2001
Location: St. Louis, Mo
Posts: 286
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Amy,

Thank you. Very much appreciated. My search wasn't going to well in here...
Reply With Quote
  #6  
Old 11-25-2001, 04:49 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah. It's on the WRONG board. (hint firefly)

Amy
Reply With Quote
  #7  
Old 11-25-2001, 04:51 PM
Hooper's Avatar
Hooper Hooper is offline
 
Join Date: Oct 2001
Location: St. Louis, Mo
Posts: 286
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After reading your post Amy as well as FireFly's above, I'm getting the feeling that what you have on your site with this hack isn't much like what Chen posted it to be. When you said "to hardcode" I just thought maybe you were saying that you did quite a bit of change to get the output you did. When you applied the code to specific forums was that too terribly difficult?

I noticed someone say that they had a problem with subforums. I have Announcements and News
Announcements
SiteNews
etc...
Basically subforums. The forums that I will most want to use this for is for SiteNews.

I'm sure I can get this to work. I really like what you've done with it. Very nice.
Reply With Quote
  #8  
Old 11-25-2001, 05:26 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No. To make it for specific forums, I did it the lazy way. In the showthread part, I modified this:

PHP Code:
if ($counter==and $pagenumber==1) {
    
$postbits .= getpostbit($post,1);
  } else {
    
$postbits .= getpostbit($post);
  } 
to this:

PHP Code:
 if ($counter==and $pagenumber==and (($thread['forumid']==72)or($thread['forumid']==76))) {
    
$postbits .= getpostbit($post,1$thread['threadid']);
  } else {
    
$postbits .= getpostbit($post,0,$thread['threadid']);
  } 
In functions.php, I changed:

PHP Code:

function getpostbit($post,$isfirst=0) { 
to
PHP Code:
function getpostbit($post,$isfirst=0,$threadid) { 
everything else is template mods.

Hope that helps.

Amy
Reply With Quote
  #9  
Old 11-25-2001, 05:38 PM
Hooper's Avatar
Hooper Hooper is offline
 
Join Date: Oct 2001
Location: St. Louis, Mo
Posts: 286
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh,

Thank You. This is the info I need. I just tried hacking what was in the thread and ended up with 2 parsing errors.

I'll try again with what you have here.

Thanks
Reply With Quote
  #10  
Old 11-25-2001, 05:48 PM
Hooper's Avatar
Hooper Hooper is offline
 
Join Date: Oct 2001
Location: St. Louis, Mo
Posts: 286
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Amy,

Did you also change what he wrote on the bottom of the hack?

and also replace

PHP:--------------------------------------------------------------------------------
// do posts from ignored users
if (!$ignore[$post[userid]]) {
eval("\$retval = \"".gettemplate("postbit")."\";");
} else {
eval("\$retval = \"".gettemplate("postbit_ignore")."\";");
}

--------------------------------------------------------------------------------

with

PHP:--------------------------------------------------------------------------------
// do posts from ignored users and create first post
if ($isfirst and !$ignore[$post[userid]]) {
eval("\$retval = \"".gettemplate("postbit_first")."\";");
} elseif (!$ignore[$post[userid]]) {
eval("\$retval = \"".gettemplate("postbit")."\";");
} else {
eval("\$retval = \"".gettemplate("postbit_ignore")."\";");
}

Thanks

Hey Chen.... This is an awsome hack.. Maybe we could do a clean up of the hack in these forums?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:47 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05269 seconds
  • Memory Usage 2,271KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete