php forum
php mysql forum
php mysql smarty
 
Topic Options
#219886 - 06/26/02 03:37 AM News scripts
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
I'm the web master for Da LAN Tech. I currently use Coranto for news posts, but I'd like to dump it and just use Threads.<br /><br />Any way to call a forum from within a shtml file, or any way to get a forum to output a text file that I could call with a server side include?<br /><br />I don't want to move to a pure php based web site (not yet, still learning the launguage). But I do want to dump Coranto like a bad habbit. The author ditched News Pro to script Coranto, wrote two betas, and then decided to dump Coranto into the open source community. It's hardly been touched in over half a year... <img src="/forum/images/icons/frown.gif" alt="" />
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#219887 - 06/26/02 12:21 PM Re: News scripts [Re: jacksonm99]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
You can use either the newscript in your addons folder or the IIP JustDave works on in this forum.<br /><br />You should be able to do a virtual include of the php file into your shtml page.
_________________________
- Allen wavey
- What Drives You?

Top
#219888 - 06/26/02 05:38 PM Re: News scripts [Re: jacksonm99]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
What Allen suggests is probably the easiest routes. I'm not sure if I can post the old w3t perl script that was used to pull "news" articles out when .threads was still being developed in both perl/php. Does Infopop have an archive area? If so it may be possible to get this script from the members area. Then you could use a standard SSI to retrieve the information. <img src="/forum/images/icons/smile.gif" alt="" />
_________________________
~Dave
ChattersOnline.com

Top
#219889 - 06/27/02 12:13 AM Re: News scripts [Re: sjsaunders]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
Thanks for the replies!<br /><br />I felt like an idiot last night when I went through the addons directory and saw the scripts (why aren't they documented in the admin guide?!). *sigh*<br /><br />The script that came with Threads looks easy enough. I'm gonna set up a test page on my site to get the hang of using it before I change my index. The one thing I did notice was that the script pulls a set number of posts. Would it be possible to hack it so that it pulls x number of days of news posts?
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#219890 - 06/27/02 01:00 AM Re: News scripts [Re: jacksonm99]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
this one should work for your version:<br /><br />http://www.threadsdev.com/threads/php/sh...mp;Number=43365<br /><br />you can set the number of days and number of posts
_________________________
- Allen wavey
- What Drives You?

Top
#219891 - 06/27/02 02:41 AM Re: News scripts [Re: SurfMinister]
Aglavalin Offline
Enthusiast

Registered: 06/18/02
Posts: 394
Loc: Southern California
Will php run when called from a virtual include in shtml? I tried it in a .asp page and it didn't work. This is the same coding I believe on a NT box. I got it to work fine when inserted into a frame, but that was not the look I was going for.

Top
#219892 - 06/27/02 11:46 AM Re: News scripts [Re: neuron]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
Good news and bad...<br /><br />You can call a php script via a SSI command:<br /><br /><!--#include file="file.php"--><br /><br />Just substitute file.php with the name of the file you want to use.<br /><br />The bad news is I've never been able to add path information to an include (not sure if it's possible, and I've tried several different way of doing it). So the php file needs to be in the same directory as the shtml file that is calling it.
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#219893 - 06/27/02 11:57 AM Re: News scripts [Re: SurfMinister]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
<blockquote><font class="small">posted by AllenAyres:</font><hr /> this one should work for your version: <br /> <br />http://www.threadsdev.com/threads/php/sh...mp;Number=43365 <br /> <br />you can set the number of days and number of posts <hr /></blockquote> <br /> <br />Unfortunately all of the links in the thread are broken <img src="/forum/images/icons/frown.gif" alt="" /> <br /> <br />I have the ubbtnews.php script working, although I'm not happy with the formatting yet (and the features mentioned in the thread you linked are exactly what I'm looking for. <br /> <br />What I want to do is: <br /> <br />Only pull x number of days of news from the database. <br /> <br />Check the date that is with a post, and if it's new generate some html to display it. Otherwise just post the news. I'd like one date posted per day on the index. <br /> <br />I'd like to change the date format (if possible) to "27 June, 2002". I'd also like to just use an abbreviation for the month. <br /> <br />I know, picky picky... <img src="/forum/images/icons/smile.gif" alt="" /> <br /> <br />I'll attach what I have, minus the paths to my php files. <br /> <br />Thanks in advance to anyone willing to help! <br />


Attachments
51255-newsmod.txt (24 downloads)

_________________________
Da LAN Tech

Threads Dev Moderator

Top
#219894 - 06/27/02 12:49 PM Re: News scripts [Re: jacksonm99]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
the link in this sentence in the first post works:<br /><br />It can be found here! Again, if you find any bugs/issues/concerns, please let me know!
_________________________
- Allen wavey
- What Drives You?

Top
#219895 - 06/27/02 12:50 PM Re: News scripts [Re: jacksonm99]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
you include the file using the URL, not the path <img src="/forum/images/icons/smile.gif" alt="" /><br /><br /><!--#include file="http://www.mydomain.com/urlto/file.php"-->
_________________________
- Allen wavey
- What Drives You?

Top
#219896 - 06/27/02 01:19 PM Re: News scripts [Re: SurfMinister]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
I've even tried that on my web hosts and it doesn't work <img src="/forum/images/icons/frown.gif" alt="" />
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#219897 - 06/27/02 02:43 PM Re: News scripts [Re: SurfMinister]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
I checked out the script, but it pulls news posts from every forum on my site (even one that is restricted to admins and mods).<br /><br />I'll have to keep hacking the one that came with Threads.
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#219898 - 06/27/02 11:13 PM Re: News scripts [Re: jacksonm99]
Aglavalin Offline
Enthusiast

Registered: 06/18/02
Posts: 394
Loc: Southern California
The SSI code of: <br /> <br /><!--#include file="http://www.mydomain.com/urlto/file.php"--> <br /> <br />and <br /> <br /><!--#include virtual="http://www.mydomain.com/urlto/file.php"--> <br /> <br />do not work at all on IIS 4.0 webserver at all. They give an error at that code line and prevent the page from compiling. <br /> <br />The coding of <br /> <br /><!--#include file="somedirectory/file.php"--> <br /> <br />and <br /> <br /><!--#include virtual="somedirectory/file.php"--> <br /> <br />both give this result: <br /> <br />sample <br /> <br />where the php was not compiled by the web server before being sent. This may work on Apache or other server software, but is not gonna work on NT IIS 4.0 and probably 5.0 too. <br /> <br />I have checked with my buddy who is a .asp guru and he tells me that virtual includes can not call from a URL, only a file in the website. That's built into IIS I guess. <br /> <br />So from what I have gathered, either the whole page is .php or you gotta call the .php from within a frame. At least on a NT box of any kind that I have seen. I just searched the MS knowledge base, and there is nothing on php and asp combined. I bet they are just being proprietary and not supporting php yet within IIS.

Top
#219899 - 06/27/02 11:47 PM Re: News scripts [Re: neuron]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
Aglavalin, I feel your pain...<br /><br />I can call a php file from within an shtml file on an Apache server, but only if the php file is in the same directory as the shtml file that is making the call.<br /><br />The sintax: <!--#include file="file.php"--> <br /><br />You can see it work at the test index that I'm working on for my web site. <br /><br />And I'm pretty sure that php commands can be parsed from a text file. So you could use <!--#include file="file.txt"--> and the php commands in the file would be parsed and executed by the web server (as long as the file that has the SSI include in it has an shtml extention, or any other extention that the web server has been configured to parse).<br /><br />I didn't make much progress last night cause I was trying to hack the file that I got from this site, and I've just recently dipped my feet into php scripting. I'll go back to trying to get the script that came with Threads to work this weekend.<br /><br />Odd that one of the php gurus here hasn't coded a more feature rich news script that works.<br />
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#219900 - 07/01/02 01:03 AM Follow up [Re: jacksonm99]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
I finished the hack over the weekend. A quick search over at the UBB Threads support site gave me the answer I needed for manipulating the output of $Posted, and writing an if else statement that would only output a date if the date of a post had changed wasn't too painful. If you want to see what it looks like just take a look at my web site.<br /><br />Later I can write up the instructions for a hack to the news posting script that comes with Threads if anyone is interested.
_________________________
Da LAN Tech

Threads Dev Moderator

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks