vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Need Hack : lat 10 posts in a marquee (https://vborg.vbsupport.ru/showthread.php?t=26695)

Stasik 09-01-2001 12:11 PM

we have to check ther threadid in thread table and get the forumid from there

ozone2000 09-01-2001 07:11 PM

FireFly, can you make it look like this:
http://www.dynamicdrive.com/dynamicindex2/crosstick.htm
... then that'll be cool!

WebMasterAJ 09-03-2001 01:17 PM

How would you make it show just the thread, and not the posts?

Other than that, this is pretty cool :)

Admin 09-03-2001 01:31 PM

webhost:
PHP Code:

<?php

error_reporting
(7);

require(
"./global.php");

$latestposts=$DB_site->query("SELECT post.postid AS id,LEFT(post.pagetext,20) AS text FROM post LEFT JOIN thread ON thread.threadid WHERE thread.forumid<>14 AND thread.forumid<>43 AND thread.forumid<>87 GROUP BY post.postid ORDER BY post.dateline DESC LIMIT 10");
$marquee "";
while (
$latestpost=$DB_site->fetch_array($latestposts)) {
  if (
$marquee) {
    
$marquee .= "&nbsp;&nbsp;";  // String to seperate between each link
  
}
  
$marquee .= "<a href=\"showthread.php?s=$session[sessionhash]&postid=$latestpost[id]\">$latestpost[text] ...</a>";
}
?>
<? echo("$marquee"); ?>

(working)

WebMasterAJ 09-03-2001 01:45 PM

hmmm... thanks, but for some reason its not showing the title of the thread, it just shows ...

Any ideas?

Admin 09-03-2001 02:00 PM

AJ, I don't understand. You want the latest 10 threads' titles to be displayed?
If so, use this:
PHP Code:

<?php

error_reporting
(7);

require(
"./global.php");

$latestposts=$DB_site->query("SELECT threadid,title FROM thread ORDER BY dateline DESC LIMIT 10");
$marquee="";
while (
$latestpost=$DB_site->fetch_array($latestposts)) {
  if (
$marquee) {
    
$marquee .= "&nbsp;&nbsp;";  // String to seperate between each link
  
}
  
$marquee .= "<a href=\"showthread.php?s=$session[sessionhash]&threadid=$latestpost[threadid]\">$latestpost[title] ...</a>";
}
?>
<marquee-code-here value="<? echo("$marquee"); ?>">


WebMasterAJ 09-03-2001 02:06 PM

AWESOME... thanks :)

Admin 09-03-2001 02:07 PM

No problem. :)

ozone2000:
I'll get to you when I fix webhost's version. :)

webhost 09-03-2001 04:03 PM

Firefly

I get this error now

Database error in vBulletin: Invalid SQL: SELECT post.postid,LEFT(post.pagetext,20) FROM post LEFT JOIN thread ON thread.threadid WHERE thread.forumid<>30 AND thread.forumid<>33 AND thread.forumid<>38 ORDER BY post.dateline DESC LIMIT 10
mysql error: Got error 28 from table handler
mysql error number: 1030
Date: Monday 03rd of September 2001 10:51:55 AM
Script: /marquee.php
Referer:

Admin 09-03-2001 06:01 PM

That's wierd, it's working perfect for me. :confused:


All times are GMT. The time now is 10:44 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.01239 seconds
  • Memory Usage 1,741KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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