Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by charsima (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 08-28-2001 Last Update: Never Installs: 0
 
No support by the author.

I need the hack that shows the last 10 posts in a marquee at the top of the forum .

Does anyone know from where to get it ?

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-28-2001, 05:15 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm already working on this.
Reply With Quote
  #3  
Old 08-28-2001, 05:35 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Add this code in your phpinclude template:
PHP Code:
$latestposts=$DB_site->query("SELECT postid,LEFT(pagetext,20) AS text FROM post ORDER BY dateline DESC LIMIT 10");
while (
$latestpost=$DB_site->fetch_array($latestposts)) {
  if (
$marquee) {
    
$marquee .= "  ";  // String to seperate between each link
  
}
  
$marquee .= "<a href=\"showthread.php?s=$session[sessionhash]&postid=$latestpost[postid]\">$latestpost[text] ...</a>"// Link and text for post

Now you can use $marquee in your marquee tag for the content.
This will only select the first 20 characters of the post, and add ... after it (with a link to the post).
Reply With Quote
  #4  
Old 08-30-2001, 06:52 PM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to use this on a non vb page?
Reply With Quote
  #5  
Old 08-30-2001, 06:56 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Create this page as marquee.php
PHP Code:
<?php

error_reporting
(7);

require(
"./global.php");

$latestposts=$DB_site->query("SELECT postid,LEFT(pagetext,20) AS text FROM post ORDER BY dateline DESC LIMIT 10");
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[postid]\">$latestpost[text] ...</a>";
}
?>
<marquee-code-here value="<? echo("$marquee"); ?>">
and put it in your forum's root.

Now just use SSI to include it
Code:
<!--#include file="vbb/marquee.php"-->
and also change the actually code for the marquee as I don't know it.
Reply With Quote
  #6  
Old 08-31-2001, 07:24 PM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Hack Firefly.

Need an addon if possible.

I would like to for example exclude forumid 14, 43, 87 from the marquee.How would I do this?
Reply With Quote
  #7  
Old 09-01-2001, 05:43 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this code
PHP Code:
<?php

error_reporting
(7);

require(
"./global.php");

$latestposts=$DB_site->query("SELECT postid,LEFT(pagetext,20) AS text FROM post WHERE forumid<>14 AND forumid<>43 AND forumid<>87 ORDER BY dateline DESC LIMIT 10");
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[postid]\">$latestpost[text] ...</a>";
}
?>
<marquee-code-here value="<? echo("$marquee"); ?>">
I think that's it... try it.
Reply With Quote
  #8  
Old 09-01-2001, 11:06 AM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

error with this. it worker before I made the change to exclude forums.

<b>Warning</b>: Cannot add header information - headers already sent by (output started at /home/realweb/public_html/marquee.php:13) in <b>/home/realweb/public_html/forums/admin/functions.php</b> on line <b>1486</b><br>

<!-- Database error in vBulletin: Invalid SQL: SELECT postid,LEFT(pagetext,20) AS text FROM post WHERE forumid<>45 AND forumid<>30 AND forumid<>33 AND forumid<>93 AND forumid<>40 AND forumid<>41 AND forumid<>38 AND forumid<>39 AND forumid<>42 AND forumid<>43 AND forumid<>46 AND forumid<>54 AND forumid<>48 AND forumid<>61 AND forumid<>50 AND forumid<>51 AND forumid<>52 AND forumid<>53 AND forumid<>55 AND forumid<>56 AND forumid<>57 AND forumid<>58 AND forumid<>59 AND forumid<>60 AND forumid<>62 AND forumid<>75 AND forumid<>70 AND forumid<>72 AND forumid<>69 AND forumid<>67 AND forumid<>68 AND forumid<>71 AND forumid<>76 AND forumid<>77 AND forumid<>78 AND forumid<>79 AND forumid<>80 AND forumid<>81 AND forumid<>82 AND forumid<>83 AND forumid<>90 AND forumid<>91 AND forumid<>88 AND forumid<>89 AND forumid<>92 ORDER BY dateline DESC LIMIT 10
mysql error: Unknown column 'forumid' in 'where clause'
mysql error number: 1054
Date: Saturday 01st of September 2001 06:04:47 AM
Script: /marquee.php
Referer:
-->
</td></tr></table>
<p>There seems to have been a slight problem with the database.
Please try again by pressing the refresh button in your browser.</p>An E-Mail has been dispatched to our <a href="mailto:support@realwebhost.net">Technical Staff</a>, who you can also contact if the problem persists.</p><p>We apologise for any inconvenience.</p><pre>

Database error in vBulletin: Invalid SQL: SELECT postid,LEFT(pagetext,20) AS text FROM post WHERE forumid<>45 AND forumid<>30 AND forumid<>33 AND forumid<>93 AND forumid<>40 AND forumid<>41 AND forumid<>38 AND forumid<>39 AND forumid<>42 AND forumid<>43 AND forumid<>46 AND forumid<>54 AND forumid<>48 AND forumid<>61 AND forumid<>50 AND forumid<>51 AND forumid<>52 AND forumid<>53 AND forumid<>55 AND forumid<>56 AND forumid<>57 AND forumid<>58 AND forumid<>59 AND forumid<>60 AND forumid<>62 AND forumid<>75 AND forumid<>70 AND forumid<>72 AND forumid<>69 AND forumid<>67 AND forumid<>68 AND forumid<>71 AND forumid<>76 AND forumid<>77 AND forumid<>78 AND forumid<>79 AND forumid<>80 AND forumid<>81 AND forumid<>82 AND forumid<>83 AND forumid<>90 AND forumid<>91 AND forumid<>88 AND forumid<>89 AND forumid<>92 ORDER BY dateline DESC LIMIT 10
mysql error: Unknown column 'forumid' in 'where clause'
mysql error number: 1054
Date: Saturday 01st of September 2001 06:04:47 AM
Script: /marquee.php
Referer:


</pre>
Reply With Quote
  #9  
Old 09-01-2001, 12:04 PM
Stasik Stasik is offline
 
Join Date: Nov 2001
Posts: 233
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

there is no forumsid column in post table we have to search in tread table with threadid, but i dont know how to do in in mySQL
Reply With Quote
  #10  
Old 09-01-2001, 12:07 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah you're right.

I'll see if I can do this...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:19 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08823 seconds
  • Memory Usage 2,315KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete