vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Thank you firefly (https://vborg.vbsupport.ru/showthread.php?t=32677)

amykhar 11-25-2001 03:54 PM

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

Admin 11-25-2001 04:04 PM

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? :D

Thanks. :)

Hooper 11-25-2001 04:18 PM

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

amykhar 11-25-2001 04:40 PM

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

Hooper 11-25-2001 04:47 PM

Hi Amy,

Thank you. Very much appreciated. My search wasn't going to well in here... :D

amykhar 11-25-2001 04:49 PM

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

Amy

Hooper 11-25-2001 04:51 PM

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.

amykhar 11-25-2001 05:26 PM

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

Hooper 11-25-2001 05:38 PM

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

Hooper 11-25-2001 05:48 PM

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?


All times are GMT. The time now is 09:02 PM.

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.01084 seconds
  • Memory Usage 1,746KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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