|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Mod Name: Random Quotes Description: Displays random quotes on the forum summary page. Can be enabled/disabled from the UBB™ Control Panel. Quotes can be edited from the Control Panel. JCTemplates supported. By: Idle Email: [email protected]Date: May 26th, 2002 Version: 2.0 Requirements: 6.3.0 Beta Release 1 or newer. Compatability: 6.3.x or newer. Tested On: 6.3.0 Beta Release 1 and 6.3.0 Files Modified: ubb_forum_summary.cgi, cp.cgi, cp_lib.cgi, vars_wordlets_cp.cgi, cp_common.pl, public_forum_summary.pl New Files: cp_quotes.cgi, cp_vars_idle.pl, cp_view_quotes.pl, cp_edit_quotes.pl, vars_idle.cgi (additional three quote files) Download: ZIP File or MultiHack v2.0 Updates: v1.1 - Instead of using a hardcoded filelist array, it now retrieves a list of files in the quotes directory. With this method, adding/removing new quote files is much easier. All you have to do is either delete a file from your NonCGI/quotes directory, or upload a new one (make sure the format is always "thequote|author").v2.0 - Major code changes. Two bugs spotted and fixed. New features include:
- All files with extensions .cgi and .txt will be read within the quotes directory
Existing users will need to re-hack the following files: ubb_lib_2.cgi - remove previous changes for this mod ubb_forum_summary.cgi - redo step two for this file cp.cgi - refer to instructions
|
|
|
|
Joined: May 2001
Posts: 6,708
Member
|
Member
Joined: May 2001
Posts: 6,708 |
Your doing great with these hacks Idle. Good job. BTW, It's Zip, not a text file.
|
|
|
|
Joined: May 2001
Posts: 794
Content Queen
|
Content Queen
Joined: May 2001
Posts: 794 |
Is there a demo of this somewhere? I'd love to see it in action.
Sue adwoff.com
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Thank you, Lord Dexter! I've done all kinds of things for my UBB... but never thought of publicizing my modifications until recently. Beside... most of them aren't "documented", and I thought it'd be good to keep notes which turned out to be full-blown UBB mods. ADWOFF: You can see it on my UBB 6.3 test board . Currently I'm working on a better CP interface, allowing administrators to view and edit the quote data files. Might add an option to even create new ones and delete existing ones.
|
|
|
|
Joined: May 2001
Posts: 6,708
Member
|
Member
Joined: May 2001
Posts: 6,708 |
I'm getting an error going to your test board.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
I'd try again since I've been playing around with it all night long and probably generated a whole bunch of errors. :rolleyes: But, it's working fine now, and I'll leave it alone for awhile.
|
|
|
|
Joined: Dec 2000
Posts: 371
Member
|
Member
Joined: Dec 2000
Posts: 371 |
It's generating a software error in cp.cgi
|
|
|
|
Joined: Dec 2000
Posts: 371
Member
|
Member
Joined: Dec 2000
Posts: 371 |
I've found an external cgi script that displays random quotes from a text file. All you have to do is put a line of javascript in the public_summary.pl and you have endless random quotes. If you want info on this, let me know.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
quote: Originally posted by Variables: It's generating a software error in cp.cgi
Could you be a little more specific, and tell me the exact error?
|
|
|
|
Joined: Mar 2001
Posts: 644
Member
|
Member
Joined: Mar 2001
Posts: 644 |
quote: Originally posted by Idle: quote: Originally posted by Variables: It's generating a software error in cp.cgi
Could you be a little more specific, and tell me the exact error?
Here's the error on your test board:
quote: CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
Can't open perl script "D:Inetpubwwwrootadvubbultimatebb.cgi": No such file or directory
Hope that helps,
~Z
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Oh... silly, little Idle! Hahahaha, I posted incomplete URL. :rolleyes: Try this instead.
|
|
|
|
Joined: May 2001
Posts: 6,708
Member
|
Member
Joined: May 2001
Posts: 6,708 |
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Sorry, was re-installing Windows. It's up again.
|
|
|
|
Joined: May 2001
Posts: 6,708
Member
|
Member
Joined: May 2001
Posts: 6,708 |
It finally worked, good to see this hack in action.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Yeah. Although the method posted by Variables above would be much easier, I like the idea of being able to modify the quotes from the UBB Control Panel. Then I can let my moderators do the chores!
|
|
|
|
Joined: Jun 2001
Posts: 572
Member
|
Member
Joined: Jun 2001
Posts: 572 |
Cool! I like it. Would there be a possibility of making a multihack file for this?
~Jon
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Yeah, that should be possible. I'll have a look in a few when I've had my first cup of coffee. Edit: Done!
|
|
|
|
Joined: May 2002
Posts: 18
Junior Member
|
Junior Member
Joined: May 2002
Posts: 18 |
If you like the quotes to be displayed into a table (like thinking clock, recent visitors) change the following (adjusted step 10 in MH):
Cant display code due to installed code filter Grab the code
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Nice one idle... I've been needing to replace the javascript one that broke on my site months ago
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Yeah, isn't it wonderful what 20 gallons of coffee and no rest can do?
|
|
|
|
Joined: May 2002
Posts: 28
Junior Member
|
Junior Member
Joined: May 2002
Posts: 28 |
Very nice! Thought I had probs with those window error messages until I checked the txt quotes though!!!
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Well... it happened to me one late night after hours of coding in Perl. :rolleyes:
The quotes in "pc.txt", I collected most of them from annoyances.com, by the way.
|
|
|
|
Joined: May 2002
Posts: 2
Junior Member
|
Junior Member
Joined: May 2002
Posts: 2 |
|
|
|
|
Joined: May 2002
Posts: 2
Junior Member
|
Junior Member
Joined: May 2002
Posts: 2 |
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
|
|
|
|
Joined: May 2001
Posts: 794
Content Queen
|
Content Queen
Joined: May 2001
Posts: 794 |
I'll have to play with this later on. I installed using Idle's Multihack, but nothing showed up--even after clearing the cache. So I installed Syntax's code for step 10. In the regular template, the area for the quote appeared, but no quote. In the JCTemplate, I received a syntax error. My brain is a fog right now, so I'll look at it later on ... is there something I'm missing in the CP for the quotes to appear? I turned it on; I went to where you could add/revise the quotes. No quotes appear.
Sue adwoff.com
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
*censored* MultiHack!@#
Sorry, I'll have a look at it soon (maybe 2 cups of coffee from now).
I don't think you missed anything, rather that I've screwed up somewhere in the MultiHack thing.
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
I think it's been fixed. Noticed some errors in the instructions for modifying JCTemplates, and vars_idle.cgi should be uploaded to your Variables directory, of course (I wrote to the CGI directory). If MultiHack isn't creating directories properly, well... create a new directory in your NonCGI directory named "quotes", and upload the included .txt files to that directory (moti- pc- and research_def.txt). Hope that solves your problem.
|
|
|
|
Joined: Apr 2001
Posts: 218
Member
|
Member
Joined: Apr 2001
Posts: 218 |
How random is it? I installed it and it only changes after I clear the cache. Otherwise everytime time I visit my test board its got the same quote on.
Thankyou :kiss:
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Well... it's as random as it gets. I had noticed that before, the quote isn't updated on the forum summary page unless you clear your cache, or disable caching completely. Kinda sad... I'll look around for possible "solutions" so it's updated on every view of the page. Thanks for the reminder!
|
|
|
|
Joined: Apr 2001
Posts: 218
Member
|
Member
Joined: Apr 2001
Posts: 218 |
quote: Originally posted by Idle: Well... it's as random as it gets.
I had noticed that before, the quote isn't updated on the forum summary page unless you clear your cache, or disable caching completely. Kinda sad...
I'll look around for possible "solutions" so it's updated on every view of the page.
Thanks for the reminder!
Thanx babe. *kiss*
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
One way around this problem would be to clear the forum summary cache right before the page is displayed... but I wouldn't recommend it since it puts so much extra load on the server and slows the process down considerably. Well, or that's what it does on my server at least. :rolleyes:
If you want to give it a try, then follow these instructions:
[code][/code]
|
|
|
|
Joined: May 2002
Posts: 18
Junior Member
|
Junior Member
Joined: May 2002
Posts: 18 |
quote: Originally posted by Laura_ubb: How random is it? I installed it and it only changes after I clear the cache. Otherwise everytime time I visit my test board its got the same quote on.
Thankyou :kiss:
I believe it is changing every hour or so, atleast it does at my board
|
|
|
|
Joined: Apr 2001
Posts: 218
Member
|
Member
Joined: Apr 2001
Posts: 218 |
[code][/code][/b] Gave it ago and it works, but it does put a lot of pressure on the server. Also a lot slower too
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Yeah. I'll have another look after dinner, maybe I can come up with something better, who knows!
|
|
|
|
Joined: May 2001
Posts: 794
Content Queen
|
Content Queen
Joined: May 2001
Posts: 794 |
Well, nuts. I tried installing this again. No dice. I hacked using the text file. No dice. I'm pretty sure I chmoded everything correctly. I uploaded the text files to a newly created quotes directory. I cleared the cache. Opened the board. Nothing. Nada. The only way I can even get the "Random Quote" table to appear is with Syntax's code; but even then, the quote doesn't appear. I guess I'll pass on this hack for now.
Sue adwoff.com
|
|
|
|
Joined: Sep 2001
Posts: 379
Member
|
Member
Joined: Sep 2001
Posts: 379 |
Wai-wai-wai-wait a minute! You're using UBB v6.2?
This mod's made for the 6.3x series, and shouldn't work under earlier versions without some modifications.
|
|
|
|
Joined: Feb 2000
Posts: 2,668
Pooh-Bah
|
Pooh-Bah
Joined: Feb 2000
Posts: 2,668 |
quote: Originally posted by Idle: Wai-wai-wai-wait a minute! You're using UBB v6.2?
This mod's made for the 6.3x series, and shouldn't work under earlier versions without some modifications.
Sue's test board is v6.3 and I think that's where she probably tried it.
- Deb
|
|
|
|
Joined: May 2001
Posts: 794
Content Queen
|
Content Queen
Joined: May 2001
Posts: 794 |
quote: Originally posted by Deb: quote: Originally posted by Idle: Wai-wai-wai-wait a minute! You're using UBB v6.2?
This mod's made for the 6.3x series, and shouldn't work under earlier versions without some modifications.
Sue's test board is v6.3 and I think that's where she probably tried it.
Deb's right! I've been trying to set up my test board so that I can upgrade my main board.
Sue adwoff.com
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 69
Joined: January 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|