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?

amykhar 11-25-2001 06:08 PM

Mine is different than his because I have the hidden posts hack installed.

However, if you don't have that installed, what Chen did should work for you.

Amy

Hooper 11-25-2001 06:16 PM

ok,

Well...It's installed and I created a template called postbit_first as he explained. I left it blank and went to check the forums posts that I pointed the new code too, it was also blank. So I must be on the right track correct?

I don't even have my posts showing up. There isn't anything in there at all.

Now do I copy and alter my postbit template and add that to the postbit_first?

Thanks Amy.

amykhar 11-25-2001 06:18 PM

You tested the same way I did. :D

Yes, I copied my postbit template in there, and then modified the hell out of it. :D

Amy

Hooper 11-25-2001 06:21 PM

Ok, I did just what I wrote above and copied my postbit to the newly created postbit_first template. Now everything looks as usual. So the hack is using postbit_first template for the desired forumID's I told it to look at.

Now I thought that I would just have a space above my posts for an article. Should I install the space into the newly created postbit_first template?

I usually just try these things but with the hack a we bit scattered I thought I'de be on the more cautious side this time. ;)


Update this post: We were posting at the same time or there abouts. That is funny what you just wrote.

Hooper 11-25-2001 06:23 PM

[QUOTE]Originally posted by amykhar
You tested the same way I did. :D

Yes, I copied my postbit template in there, and then modified the hell out of it. :D

Amy

amykhar 11-25-2001 06:24 PM

so when are you going to show off your handy work?

I am dying to see what you do with it.

Amy

Hooper 11-25-2001 06:28 PM

As soon as you send me your template so I can figure out what I'm doing..... :D


Read the previous post. I have tears in my eye.

amykhar 11-25-2001 06:42 PM

oops. :Blush:

I'll email you my template. Give me a sec.

Amy

Hooper 11-25-2001 06:59 PM

Sent you my site link. .... OhBoy. :D

amykhar 11-25-2001 07:01 PM

want my showthread template too? :D

Amy

Hooper 11-25-2001 07:04 PM

Don't think we can do that. Policy I think. ... :D

What changes on the showthread can I do to make this work any different than yours?

amykhar 11-25-2001 07:08 PM

I think we can exchange templates. People post styles all the time.

It handles that table alignment problem and stuff that you're still having.

Amy

Hooper 11-25-2001 07:10 PM

[QUOTE]Originally posted by amykhar
I think we can exchange templates. People post styles all the time.

It handles that table alignment problem and stuff that you're still having.

Amy

Bald Bouncer 11-25-2001 08:15 PM

nice work...shame I couldnt get it too work with 2.2.0 though :(

amykhar 11-25-2001 08:18 PM

Bald Bounce, I am using 2.20

Amy

tubedogg 11-26-2001 04:21 AM

As long as both of you have licenses you are free to exchange program files. You may not exchange or give them to unlicensed individuals, however.

Hooper 11-26-2001 04:23 AM

Ok. Thanks Kevin. Can I have all of your files now? :D

tubedogg 11-26-2001 04:27 AM

Trust me you don't want my files. :p

Hooper 11-26-2001 04:30 AM

I believe it. :D

Hey Kevin, what $call do I make to the db to get number of responses to a given thread?

This is for........ Comments ($number of comments)

Thanks

tubedogg 11-26-2001 04:33 AM

SELECT replycount FROM thread WHERE threadid='xxx';

Replace xxx with the threadid.

Hooper 11-26-2001 04:38 AM

Hmmm. No easy way like "$responses [to this thread]"


Lol..... :D

I get the idea but I have no idea where to place the code your talking about. This is for what the topic of the thread is about. I have this hack installed and loving it (Thanks to the Wonderful Amy's help). But I just wanted to have the number of replies posted within the postbit_first template.

tubedogg 11-26-2001 04:42 AM

Nope, fraid not. :(

Hooper 11-26-2001 04:47 AM

:mad:

*Hooper pouts to no avail*

Admin 11-26-2001 11:47 AM

[QUOTE]Originally posted by amykhar
[...] Oh, and I also passed the thread id to the function so that my comment link in the first post would work.
[...]
Amy

Hooper 11-26-2001 07:01 PM

Why doesn't $thread[replycount] work? within the postbit_first template?

Any Ideas?

amykhar 11-26-2001 08:20 PM

Now you tell me Chen :)

Amy

Hooper 11-26-2001 08:21 PM

Hey Amy,

Will what he wrote help us if we change some code?

Admin 11-27-2001 11:48 AM

Hooper, I e-mailed you anyway with what you need before seeing this post.

Anyway, adding $thread to the list of global vars is enough.

Hooper 11-27-2001 04:32 PM

Wow that was easy. I added the $thread to the functions.php and had it working in 1 minute.

Thank you very much Chen.


Amy,

I forwarded the info to you for your page if you would like it. :)

Crinos 11-27-2001 06:13 PM

Uhm, anyone wanna compile this one and make it easier for us who wanna do it too? The whole process is scattered in two boards. Thanks :D


All times are GMT. The time now is 07:45 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.01341 seconds
  • Memory Usage 1,815KB
  • 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
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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