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.

P45 07-02-2001 07:09 AM

<a href="http://www.p45rant.com" target="_blank">http://www.p45rant.com</a> is where i;m using this to pull threads from our forums.... version 2.01 vbb....

interesting glitch... it shows everu thread twice except when i havbe made the final post on a thread when it shows it once....

ever seen this before?

NORRITT 07-02-2001 08:22 AM

thanks tubedogg
:)

dost 07-03-2001 10:56 AM

Thanks for the help tubedogg! I appreciate it.

One last thing: Is there a way to save the output of the script to a .txt file everytime it's executed?

Thanks

Oystein 07-03-2001 02:07 PM

Quote:

Originally posted by Oystein
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!


Why can't I get an answer to this?
It's quite irritating to see replies to all other questions except mine... :-(

Alien 07-03-2001 03:59 PM

Quote:

Originally posted by P45
http://www.p45rant.com is where i;m using this to pull threads from our forums.... version 2.01 vbb....

interesting glitch... it shows everu thread twice except when i havbe made the final post on a thread when it shows it once....

ever seen this before?

Yeah, I get this glitch too on a client's site.

Hmm... I'd like to get that looked at! :)

tubedogg 07-03-2001 09:54 PM

Quote:

Originally posted by Oystein
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!

What are guests called in the lastposter column in the thread table? Is it blank or is it "Guest" or...?

Oystein 07-04-2001 06:41 AM

My board is in norwegian, so the word for the unregistered users are "Uregistrert bruker" which is a direct translation.

Do I have to put that phrase somewhere in the script?

tubedogg 07-04-2001 12:48 PM

No, but I don't allow guests to post on my board and I'm trying to determine what gets put into the username column in the post table when a guest posts since there is no username. I assume it's either blank or it's "Unregistered" or "Guest".

nannoman 07-04-2001 12:52 PM

hello tubedogg!
how can I include this hack in a HTML file?

Oystein 07-04-2001 01:00 PM

Quote:

Originally posted by tubedogg
No, but I don't allow guests to post on my board ...
IF you could make a way so guests could be included, I'd be most thankful. Isn't it possible just to skip a check on the userid?

from my tables I see that in table user, the registered users have value 1 and unregistered have the value 0

I don't know about the rest though.

Mail me if you need to :-)

tubedogg 07-04-2001 01:08 PM

OK but what about the post table? There's a username column - what's in that column for posts by unregistered users?

Oystein 07-04-2001 01:13 PM

in table post, username is either:
1. registered username (like mine "Oystein")
2. unregistered username (always "Uregistrert bruker")

The unreg. username is the same as I've edited in the file where it was written as "Unregistered" originally.

tubedogg 07-04-2001 01:38 PM

OK I think I have it figured out. Try the one attached to this message and see if it works.

Rename it to last10.php. The config file hasn't changed so you can just upload this one.

dareen 07-04-2001 09:26 PM

it was working great until a imported my ubb posts i got this error
-----------------------------
MySQL reported this error while trying to retreive the info: The table 'SQL3c86e_0' is full
----------------------------

any help?

Oystein 07-05-2001 07:01 AM

Quote:

Originally posted by tubedogg
OK I think I have it figured out. Try the one attached to this message and see if it works.

Rename it to last10.php. The config file hasn't changed so you can just upload this one.

Whatever you did, it worked... just tested, and now the unregistered users posts are shown..

but (!) Replies are not shown :p I guess you changed a bit too much :-)

Edit: Forget this last one... but you had written $replyword instead of $threads[replycount]. But I just changed it, so now it works.

Thanks a lot for helping out. Actually it means a lot :-)

JJR512 07-08-2001 03:38 AM

Can someone help me with some adjustments to this hack...Here's what I'd like. Instead of showing the Last Poster, I'd like to see the Thread Starter...and instead of showing the text of the last reply, I'd like to see the text of the first (opening) message of the thread. And I'd like for the output to be sorted in order of when the threads were originally posted, not by when the last reply was.

Thanks in advance!

dost 07-08-2001 12:19 PM

You are lucky JJR512 :D, I did all the changes you wanted eventhough I know nothing about php and mysql because I guess tubedogg was a little bit busy :rolleyes:

Code:

// the base WHERE statement
$wheresql = "WHERE thread.lastposter=user.username AND thread.open!='10'";

to
PHP Code:

// te base WHERE statement
$wheresql "WHERE thread.postusername=user.username AND thread.open!='10'"

and
Code:

// ooh a query!
$query = "SELECT thread.lastpost,thread.title,thread.lastposter,thread.replycount,thread.views,user.userid,thread.threadid,thread.forumid$fsel,thread.iconid FROM thread,user$ftitle $wheresql ORDER BY thread.$ob $obdir LIMIT $maxthreads";

to
PHP Code:

// ooh a query!
$query "SELECT thread.dateline,thread.title,thread.postusername,thread.replycount,thread.views,user.userid,thread.threadid,thread.forumid$fsel,thread.iconid FROM thread,user$ftitle $wheresql ORDER BY thread.$ob $obdir LIMIT $maxthreads"

and
Code:

$fd = date($fdt,$threads[lastpost]);
PHP Code:

$fd date($fdt,$threads[dateline]); 

Also in the config file, don't forget to change $ob to dateline. Like:
$ob = "dateline"
I hope that helps. Please remind me if I have forgotten some parts because I modified the code a lot so it's hard to track the changes I have made.

gmyachtsman 07-09-2001 10:24 PM

I have this hack working nicely on my front page, and I am trying to also ad the hack to a page (citysailor.com) on a different server that doesn't support PHP.

I tried using the full path to the last10.php and last10config.php files in my include statement like this:

<!--#include virtual="http:// http://www.harborsailing.com/public_.../last10_ny.php"-->

But I am getting this error:

[an error occurred while processing this directive]

I might be missing something really simple --- any ideas how to make it work?

Steve Machol 07-10-2001 03:52 AM

I just installed this for testing and it's absolutely great! Good job Kevin!

One slight problem though. Some of the message icons show broken images, although the images are fine in the actual forum and thread displays. Here's the URL:

http://130.94.168.29/last10/last10.php

Any idea how to fix?

P.S. It appears the last10 script is adding icon15.gif and icon16.gif whch don't exist. Where did it get these icons from? They're not in the messages or forumdisplay. :confused:

Steve Machol 07-10-2001 06:57 PM

I've determined that the problem with the message icons occurs whenever an icon is used that was not part of the orginal distribution (icons 1-14.)

Steve Machol 07-11-2001 02:38 AM

Just a followup to say that I've kludged a 'fix' for this. I went into the Admin Control Panel, found the iconids of each of the icons above icon14, and copied each GIF to the corresponding iconxx.gif file. Now all of the message icons appear as they should.

Steve Machol 07-11-2001 05:28 PM

Has anyone noticed just has badly this looks in Netscape. Here's a screenshot of the Last 10 hack with NS 4.72.

Any ideas on how to fix this?

JJR512 07-12-2001 02:22 AM

DoST, thanks for your help! All seems well, except for one detail: the $showmessages option. It's still showing the text of the last reply. I was wondering, how can I fix it to show the text of the first message, the original message in the thread?

And again, thanks!

Steve Machol 07-13-2001 01:23 AM

*Bump*

I'd still like to see if anyone has an idea how to fix the problem with how this hack displays with Netscape.

N.B. 07-13-2001 09:27 AM

I do have a problem with your script :)
Or should I say: with PHP ...

www.cdrsoft.cc/test.shtml
It already works fine, and so I tried to add to my main site:
www.cdrsoft.cc/indes.php with the <? include("last10.php"); ?>
And nothing apears, I use PHP Nuke for the site, and it doesn?t parse the data from the skript, it just enters the line as it is ..
Do you know how to get this work ?

Thx for your help !
Cya !

Rostor 07-13-2001 11:03 AM

There is a way to make it works on IIS5 ?

Or do you now if there are other hacks do the same of last10 ?

maverick1236 07-13-2001 11:56 AM

Fatal error: Failed opening required 'http://ftpcentral.dyndns.org/upload/admin/config.php' (include_path='') in e:\nusphere\apache\htdocs\upload\last10.php on line 13

anyone know how to fix this?
tx!

tubedogg 07-14-2001 07:12 PM

Rastor: There's no reason why it shouldn't work on IIS5. Have you tried it?

Steve (smachol): http://www.vbulletin.com/forum/showt...043#post122043

Steve Machol 07-14-2001 07:33 PM

Thanks Kevin. That fixes some of the problem but there's still more. For instance, NS also does not display the correct font colors and the tables don't line up. Plus there's still some overlapping. Here's the pic:

Steve Machol 07-14-2001 07:35 PM

And here's the same images as viewed with IE. (Note also that both IE and NS display the [ SIZE=4] instead of the actual font size.)


All times are GMT. The time now is 08:45 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.01978 seconds
  • Memory Usage 1,853KB
  • 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
  • (5)bbcode_code_printable
  • (3)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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