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 06-24-2001 07:00 PM

Jason- I'm having that problem too, and only in Netscape. The pages look GREAT in IE 5, but downright frightening in Netscape. I even upgraded my Netscape browser (I never use it, hate that program!) to see if that would fix it, but it didn't. The tables look all strange and don't go all the way across, plus the fonts are messed up. They will look fine in one post and messed up on the next. Really weird! I wonder if Netscape doesn't like the style settings in the table tags? Not sure!
TigerLily:)

jdebler 06-24-2001 11:27 PM

Quote:

Originally posted by TigerLily
Really weird! I wonder if Netscape doesn't like the style settings in the table tags? Not sure!
TigerLily:)

Well, Netscape likes the style settings until you specify a width of the table. This is what is confusing to me.:confused:

Also, I notice that when I load the page in either Netscape or IE, it takes about 10 seconds to load the table with the information, but loading just the forum itself is lightning quick. Does it have to first parse it in the forum, and then does the hack have to parse it again?

I am not criticizing the hack in any way because I think it is very cool, but like I said earlier, I am just learning this stuff and would like to know why things work the way they do. Troubleshooting is one of the best ways to learn something, I think. :)

Jason

dost 06-25-2001 09:31 PM

xdam: Using this hack as a news script! Great idea, thanks man, I'll do the same thing.

tubedogg: As I told before, I'll use this wonderful hack as a news script. I don't know anything about php so I'll beg for a few customizations:
1)*Please answer this one, it's the most important one* How can I sort order of the list by "date posted" ?
2) This is not so important but I'll appreciate if you can answer. How can I display different messages by the number of replies? Like "Go Reply" if there are no replies, "1 Reply" if there is 1, "X Replies" if there are more ... I think you get the idea.
3) This is also not important. Don't answer if you don't have time. Is there any way to display the date once for the threads that are opened at the same day? Like:
26 June 2001
Thread 1
Thread 2
27 June 2001
Thread 1 ...

Thanks for the great hack!

jarvis 06-26-2001 02:27 PM

Great hack... Finally got it working on my IIS homepage at www.mhogaming.com . Darn all you Unix guys. ;)

Thanks for the awesome hack!!

Oystein 06-28-2001 09:52 AM

tubedog:

the hack is nice... but as I've said some times now, it doesn't display posts made by unregistered users. The thread doesn't become visible in the hack until a registered user replies.

Any fix for this, and I'd be greatful!

gmyachtsman 06-29-2001 01:44 PM

I am having problems getting the last 10 to show up on my web page from my include file into the first page of my website harborsailing.com . I am hosted on an apache server at hostrocket.

I tried to include the last20.php file in a .shtml file, .shm file, and a .php file, all without complete success.


.htaccess

I was concerned that part of my problems could be due to .htaccess: I saw on a thread elsewhere that I could edit the .htaccess file to include the following:

AddType text/html .shtml .shtm .html .htm
AddHandler server-parsed .html .shtml .shtm .htm

and that maybe that would work for adding .php too.

See: http://forums.hostrocket.com/showthr...light=htaccess

My past experience with .htaccess indicated to me that as soon as it is loaded onto the website by ftp, it disappears. But I was able to set my Leap ftp going to options-->preferences-->view to show hidden files.

I created a .htaccess file with the prescription above and put it in my public_html folder (there had been none there).



What I tried:

1. In .shmtl type files

When I used

<!--#include file="last10/last10.php"-->

or

<!--#include virtual="last10/last10.php"-->

(with or without a first "/") and
placed them in files with a .shtml ending I got unparsed included files showing up as raw php code.

With .stm I got a directory index and when I clicked on the index file, I got the same as above.

Incidentally, this is the same thing I get when I try to access to included page directly:

http://www.harborsailing.com/last10/last10.php


2. In .php type files

Then I tried changing my own main index file name to end in .php (the include was on the first page). And I tried this code:

<?php include("last10/last10.php"); ?>

But when I did that nothing showed up for the include (with or without a first "/").

I also tried including the full http:// address with the same result of not showing up.

I tried putting the include in the header, in the body, and after the body. Did I need to call it? If so, maybe that is why I saw nothing.

gmyachtsman 06-29-2001 09:50 PM

OK -- I've figured out why I was getting the raw code showing up on my .shtml pages. It was the .htaccess file. The clue was that the Vbulletin forum wasn't being parsed either:

After I had named my index file index.php, I noticed that the .htaccss file in my public_html folder was preventing my VBulletin board from being evaluated. Instead all you saw on the forums page was a jumble of writing in the browser.

Deleting the .htaccess file solved that. Remembering that I had seen the same thing at the bottom of my .shtml page, I converted back to using that page (without the .htaccess fiel this time.)

The result was that the file was properly included in my browser with the <!--#include virtual="last10/last10.php"--> line as previously used above.

Now why were people saying to use the .htaccess file again?

One other change I had to make was because I was getting an error from the parsing of the included php file where it needed to access the config file.

I had to change the path to "../discussion/admin" since I had to go up one step from my last10 folder before going down.

Now it is all working fine. And it also works if I switch the index file to a .php ending. What a problem this .htaccess stuff caused me and somehow it seems that I did it all to myself!!!

Thanks for the cool hack!!

tubedogg 06-30-2001 03:59 AM

Quote:

Originally posted by DoST
1)*Please answer this one, it's the most important one* How can I sort order of the list by "date posted" ?
Not sure what you mean by date posted. If you mean the date the thread was started, then you would use
thread.dateline
for the $ob variable. Otherwise I'll need a bit more explanation. :)
Quote:

2) This is not so important but I'll appreciate if you can answer. How can I display different messages by the number of replies? Like "Go Reply" if there are no replies, "1 Reply" if there is 1, "X Replies" if there are more ... I think you get the idea.
Find
Code:

while ($threads = mysql_fetch_array($tr)) {
        // are we going to show the message too?

and replace it with
Code:

while ($threads = mysql_fetch_array($tr)) {       
        if ($threads[replycount] == 0) {
                $replyword = "Go Reply";
        } elseif ($threads[replycount] == 1) {
                $replyword = "One Reply";
        } elseif ($threads[replycount] > 1) {
                $replyword = $threads[replycount]." Replies";
        }
        // are we going to show the message too?


NORRITT 07-01-2001 08:39 PM

Hi,

is it possible to set the subboards you want to show in this hack?

tubedogg 07-02-2001 04:59 AM

Quote:

Originally posted by tubedogg
$excludeforums > List certain forums to be excluded. Best used if you have a large number of forums you *do* want included and only a few that you want excluded. List them separated by commas, but without spaces - e.g. 1,2,3,4 - and DO NOT fill in both this and $includeforums! Use one or the other.
$includeforums > List certain forums to be included. Best used if you have a small number of forums that you want included and a large number you want excluded. List them separated by commas, but without spaces - e.g. 1,2,3,4 - and DO NOT fill in both this and $excludeforums! Use one or the other.


All times are GMT. The time now is 09:09 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.01487 seconds
  • Memory Usage 1,758KB
  • 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
  • (2)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