vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Last XX Posts on non-vB page (https://vborg.vbsupport.ru/showthread.php?t=12324)

TigerLily 11-03-2001 03:12 AM

I love this hack, but Netscape has been giving me headaches with this one for a WHILE. I finally got really fed up and kept tinkering until I found some solutions! Here is what I did, you can find a zip of the last10 files I changed here if you want to see them:
http://frugal-moms.com/last10NSfix.zip

Note: I am using vBulletin 2.0.3, getting ready to install 2.2, will let you know if there are any problems!

In last10.php (I called mine active.php):

1) Getting rid of that funky town text!

I took all style tags (such as style=\"font-family:$f; font-size:$fs; color:$tc;\") out of the table tags (mostly td) and put them in font tags right after those tags.

For example:

Code:

echo("<td style=\"font-family:$f; font-size:$fs; color:$tc;\" align=\"center\"><b>Last Poster</b></td>\n");
I changed to this:

Code:

echo("<td align=\"center\"><font style=\"font-family:$f; font-size:$fs; color:$tc;\"><b>Last Poster</b></td></font>\n");
2) Getting rid of the jagged table edges on the right side:

I added an extra td cell at the end of each row so that the full length of the table rows (particularly the colored ones) would show up correctly in Netscape. There are two places that need this- in the top bar that defines each field and then again in the column that actually displays them- thread title, replies, etc. Here is where to find them:

a) In top bar (the one that says Thread Title, Last Poster, etc)- which has displays your $hc color (right after the "Replies" column around line 50). Replace this:

[CODE]echo("</tr>\n");[CODE]

with this:

Code:

echo("<td bgcolor=\"$hc\">&nbsp;</td></tr>\n");
b) Directly beneath the top bar, in the row that displays the actual title of the thread, # of replies where your $hc2 color is. In the echo tag above "// are we showing the last post?" around line 228 replace this:

Code:

echo("</tr>");
with this:
[CODE]echo("<td bgcolor=\"$hc2\">&nbsp;</td></tr>");[CODE]

3) Sprucing up the table:

a) Message text tables- I hardcoded the colspan in line 231, replacing this:

Code:

echo("<tr $twt bgcolor=\"$bc\"><td colspan=\"$cols\" style=\"font-family:$f; font-size:$fs; color:$tc;\" align=\"left\">\n");
with colspan=5 so that the message tables were all the same length (you can make it as wide as you like):

Code:

echo("<tr $twt bgcolor=\"$bc\"><td colspan=5><font style=\"font-family:$f; font-size:$fs; color:$tc;\" align=\"left\">\n");
b)Getting the dark lines to show up around the table-I added an extra table in my shtml page with the background color I wanted. I dropped the include tags into the middle of this table:

Code:

<table width="600" bgcolor="000080" border="0" cellspacing="0" cellpadding="0"><tr><td>
<!--#include file="last10.php"--></td></tr></table>

It's late- I hope I remembered everything I did, LOL. Feel free to use my upload files as a template or something to compare too. You can see the results here:

http://frugal-moms.com/boards/active5.shtml

I use this script to show forums within certain categories since I have so many boards. It comes in handy, and I'm glad that our Netscape uses can finally see this page correctly. I would still love to have the page show up to match the user-selected style of the boards rather than hardcoded, but I'm not sure how to make that work-yet!
Kim:)

Mobile 11-03-2001 01:18 PM

when i reply to a thread, i get the last post as my 'post subject' anyone got the same problem?

-Mobile

tweak 11-05-2001 02:13 AM

Woot Nice

LuBi 11-13-2001 12:28 AM

This hack worked great quick install also. Another great one!

Suprascene.com - See it here

inetd 11-24-2001 07:16 PM

The given script under vb2.2.1 works? And whether it can show messages only from the defined category?

Steve_S 11-24-2001 11:19 PM

Quote:

Originally posted by inetd
The given script under vb2.2.1 works?

Yes :) see:

http://www.geekvillage.com/last_25_posts.html

And whether it can show messages only from the defined category?

just set up the config file to use the forums you want in a given cat. Each Forum has a unique id and you would specify them each like this:

Code:

$includeforums = "1,2,3,4"; // if you only want to include certain forums, put their ids here. separate more than one with commas, NO SPACES! e.g. 1,2,3,4


inetd 11-25-2001 09:12 AM

error:
Fatal error: Failed opening required 'http://boltalka.com.ua/admin/config.php' (include_path='.:') in /boltalka/last10.php on line 13

petemay 12-02-2001 04:10 PM

Quote:

Originally posted by jarvis
Rostor,

I, too, was getting your exact same error. I went round and round for days wondering what the heck was going on in my little NT world. :(

I have found that IIS appears to have problems with filtering or parsing included files. The IIS include is looking for a txt or HTML file, and thus I could not get it working with a plain SHTM(L) include statement.

What I did as a work around, is I set up my SHTM pages to be parsed by the PHP Isapi filter versus the ssinc.dll that is default. Basically my homepage is now PHP parsed, but still mostly HTML-based. Have I confused you yet? :)

Now that my page is PHP-parsed, I can just just the standard <? include("last10.php"); ?> statement in my code and everything works fine. I was a bit nervous about doing this as I wondered if any of my FP extensions would not function, but all seems to working well. (knock on wood)

You can view how I implemented the hack on my site at www.mhogaming.com

Hope that helps...

-Brian

Jarvis,

How did you "set up my SHTM pages to be parsed by the PHP Isapi filter versus the ssinc.dll that is default."? I'm also a hopeless IIS user and this sounds like it will work for me. I'm not familiar with PHP though. Is this an IIS configuration change, a PHP change, or a registry tweak?

Thanks

jarvis 12-03-2001 02:14 AM

Quote:

How did you "set up my SHTM pages to be parsed by the PHP Isapi filter versus the ssinc.dll that is default."?
Well, I am no IIS guru by any means... But, that being said :)

It IS an IIS configuration change, so just go into your management console and select the 'Home Directory' tab, then hit the 'Configuration' button. From here you will see all of the available extensions. Just click on the extension(s) that you want to PHP parse. I selected .sHTML. Assuming you have the basic install of PHP, just point the executable line to \Winnt\system32\sapi\php4sapi.dll and allow all verbs.

Hopefully that helps!!

-Brian
www.mhogaming.com

petemay 12-04-2001 06:27 AM

Thanks for the additional details...

It appears that I do not have a

Winnt\system32\sapi\php4sapi.dll

in fact the 'sapi' directory does not even exist under system32?!

I figured I must have an incomplete install of PHP, so I re-installed PHP V4.0.6. Even after that install I do not have that directory or .dll??

When I run the last10.php script directly, I get several of the following 'warning' messages:
Quote:

Warning: Undefined variable: fsel in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 108

Warning: Undefined variable: ftitle in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 108

Warning: Undefined variable: counter in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 172

Warning: Use of undefined constant title - assumed 'title' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 178

Warning: Use of undefined constant title - assumed 'title' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 182

Warning: Use of undefined constant lastpost - assumed 'lastpost' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 185

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 190

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 190

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Use of undefined constant iconid - assumed 'iconid' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196

Warning: Use of undefined constant iconid - assumed 'iconid' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196
HOWDY 12:51 AM

Warning: Use of undefined constant title - assumed 'title' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 178

Warning: Use of undefined constant title - assumed 'title' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 182

Warning: Use of undefined constant lastpost - assumed 'lastpost' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 185

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 190

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 190

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Use of undefined constant iconid - assumed 'iconid' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196

Warning: Use of undefined constant iconid - assumed 'iconid' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196
test 10:18 PM

Warning: Use of undefined constant title - assumed 'title' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 178

Warning: Use of undefined constant title - assumed 'title' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 179

Warning: Use of undefined constant lastpost - assumed 'lastpost' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 185

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 190

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 190

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Use of undefined constant iconid - assumed 'iconid' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Use of undefined constant iconid - assumed 'iconid' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196

Warning: Use of undefined constant iconid - assumed 'iconid' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196

Warning: Use of undefined constant iconid - assumed 'iconid' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196
How do I use the makeuser... 08:55 AM

Warning: Use of undefined constant title - assumed 'title' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 178

Warning: Use of undefined constant title - assumed 'title' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 182

Warning: Use of undefined constant lastpost - assumed 'lastpost' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 185

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 190

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 190

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Use of undefined constant iconid - assumed 'iconid' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196

Warning: Use of undefined constant iconid - assumed 'iconid' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196
just a test 08:29 AM

Warning: Use of undefined constant title - assumed 'title' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 178

Warning: Use of undefined constant title - assumed 'title' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 182

Warning: Use of undefined constant lastpost - assumed 'lastpost' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 185

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 190

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 190

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Use of undefined constant iconid - assumed 'iconid' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 193

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196

Warning: Undefined variable: postii in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196

Warning: Use of undefined constant iconid - assumed 'iconid' in D:\My Documents\My Webs\fieldengineering\vbforum\last10.php on line 196
this is another test 03:53 PM
The process appears to be running from PHP directly, but generating all those Warning messages... as you can see in the text bolded in the quote "this is another test" is the title of one of my test posts... Seems like something is seriously misconfigured to me, but I don't know where to start to figure it out.

I'm pretty fresh to PHP - but willing to learn - no matter how painful it may be right now....

Thanks.


All times are GMT. The time now is 06:36 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.01607 seconds
  • Memory Usage 1,812KB
  • 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
  • (8)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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