vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   What's new (https://vborg.vbsupport.ru/showthread.php?t=2950)

09-05-2000 06:05 AM

I wonder if this kind of hack is already there, please make one if not.

1. We create a board that is only allow users to read.
Only moderators can post. And we post "news" just like post a new thread.
2. Auto. list newest 5 "news" threads on the frontPage , and shows only Topics,20 words of content. and a [more] links to the VB threads.

09-05-2000 01:52 PM

This is exactly something I was asking for on another thread in this forum topic. Maybe we'll get what we want soon if enough people find it useful.

Krish

09-05-2000 02:25 PM

That's already out there.

You can make any forum read only to members. And there is a hack that I *kind of made* that lists the x most recent topics posted. See my main page for an example.


krishmandal - Maybe you'd get what you want if you took the time to search for it

-jim

09-05-2000 03:02 PM

Quote:

Originally posted by krishmandal
This is exactly something I was asking for on another thread in this forum topic. Maybe we'll get what we want soon if enough people find it useful.

Krish

I am making one right now, and it is almost done.
Will post here when I finished.
But, I am a newbie to PHP !

09-05-2000 04:22 PM

This does exactly what you are asking about.

http://www.vbulletin.com/forum/showt...?threadid=1384

-jim

09-05-2000 10:38 PM

I look forward to your hack James.
I am too new to PHP and MySQL to do anything worthwhile right now, otherwise I'd try it myself. Best of luck, I'm rooting for you.

09-06-2000 01:03 AM

Quote:

Originally posted by JimF
This does exactly what you are asking about.

http://www.vbulletin.com/forum/showt...?threadid=1384

-jim

Hi!
Thanks for you help, but, I really didn't see what I want there, where is the news ?

09-06-2000 01:08 AM

Quote:

Originally posted by JimF
That's already out there.

You can make any forum read only to members. And there is a hack that I *kind of made* that lists the x most recent topics posted. See my main page for an example.

-jim

I may be totally dillusional here, but this is what you want. Take a look about halfway down my front page on the right.

You insert that code into your page. You create the news. That code displays the news on your front page.

It's easy.

-jim

09-06-2000 03:03 AM

First, your Frontpage that you want to put the What's new on, should be a .php or .php3 file.
On that page , put this on:

<table border="0" width="55%">
<tr>
<td width="70%"><font color="#008000">Your What's New News System Title</font> </td>
<td width="30%"><A HREF="http://yourdomain/forum/index.php3?categoryid=1" target="_blank">Total x records</A></td>
</tr>
<tr>
<td width="100%" colspan="2"><HR NOSHADE="TRUE" ALIGN="LEFT" SIZE="1" COLOR="#CCCCCC" >


<?php

require("callnews.php3");

?>
</tr>
</table>

Then, upload this callnews.php3 file to the same directory :

<?
########what this file do: pull categoryid=1 's data to frontpage
$x=2; //How many news you want to display ?
require("/your/path/to/admin/config.php3");
$db=mysql_connect($servername,$dbusername,$dbpassw ord);
mysql_select_db($dbname);
$query = "SELECT * FROM thread where forumid='1' ORDER BY lastpost DESC ";
$result = mysql_query($query,$db);
$y=1;
while ($news_array = mysql_fetch_array($result)) {
$query = "SELECT * FROM post where threadid=$news_array[threadid] ";
$result2 = mysql_query($query,$db);
while ($post_array = mysql_fetch_array($result2)) {
$show_brief = substr($post_array[pagetext],0,20);
$post_time = date("Y-m-d h:i A",$news_array[lastpost]);
}
echo "<p style=\"margin-left: 10\"><img border=\"0\" src=\"http://www.dell.com/images/global/contentnav/content_action.gif\" width=\"17\" height=\"17\"><font size=2 color=blue>$post_time </font><A HREF=\"http://yourpathto/showthread.php3?threadid=$news_array[threadid]\"><font size=2>$news_array[title] </font></A><br> <font size=1>$show_brief...</font> <font size=1>views:$news_array[views]</font><br>";
$y++;
if ($y > $x){
break;
}

}

?>

09-06-2000 04:27 AM

James,

Great job. Right on the money. There were a few tweaks I had to do for my own forum, since I didn't leave it with the standard /forum/ directory, and I had to adjust the forum number, etc., but it works, and it works well. It's exactly what I was dreaming of.

Now if JimF had actually TAKEN THE TIME to read what we were asking for, maybe his would work the way we wanted. But it doesn't do what yours does.

I'm really glad you posted your solution here. A million thanks man.


All times are GMT. The time now is 04:55 PM.

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.01644 seconds
  • Memory Usage 1,737KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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