Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases

Reply
 
Thread Tools
Cache Cannon - Search Engine friendly + plus archive tool. Details »»
Cache Cannon - Search Engine friendly + plus archive tool.
Version: 1.00, by buro9 buro9 is offline
Developer Last Online: Jul 2012 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-10-2002 Last Update: Never Installs: 5
Is in Beta Stage  
No support by the author.

This is a first release beta.

I had hoped to finish it before now, but the past week of vb 2.2.3 > 2.2.3b > 2.2.3c > 2.2.4 means that I have lost nearly all my spare time in upgrading boards and re-applying hacks!!! Thanks vb!

Anyhow... the cache cannon is a simple script that will loop through the database and will, in essence, splurge every post onto the docroot in the form of a static file.

In this first beta the functionality of splurging onto the docroot is intact, as is the control panel interface.

Still to be done is indexing the resultant directory structures (for the search engine spiders to follow) and prettying up the resultant file.

This is released here as a first beta only, and is for developers only to aid it's improvement.

I do aim to finish this within the next fortnight, but in light of my lost time though it wiser to just get it out there for the meantime!

Cheers

David K

PS: Should've stated more clearly it's purpose! It's designed to perform this splurging primarily to aid with sites being indexed by search engines. Because they are static files they can be indexed quicker, and you can tweak the format to enhance the hit rate.

A second purpose of it is as a static archive of your board. It you are going to upgrade... want to start over, or are just spring cleaning and would like to archive posts in a static method outside of the database, then this will also serve you.

Edited for new version on 2002-03-20 21:11 GMT

Show Your Support

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

Comments
  #22  
Old 03-24-2002, 03:53 PM
99SIVTEC 99SIVTEC is offline
 
Join Date: Nov 2001
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please wait... doing page 1

Warning: MkDir failed (Permission denied) in /home/sportcom/public_html/vbulletin/admin/cachecannonfunctions.php on line 44

Warning: MkDir failed (No such file or directory) in /home/sportcom/public_html/vbulletin/admin/cachecannonfunctions.php on line 51

Warning: MkDir failed (No such file or directory) in /home/sportcom/public_html/vbulletin/admin/cachecannonfunctions.php on line 51
Dumping to ../archive/f_19/t_298/p_3335.htm

Warning: fopen("../archive/f_19/t_298/p_3335.htm", "w") - No such file or directory in /home/sportcom/public_html/vbulletin/admin/cachecannonfunctions.php on line 94
error opening file

I got that error after installing and attempting to run. I'm on a linux server and it appears to be permissions problems. What would I do to remedy this?
Reply With Quote
  #23  
Old 03-24-2002, 04:13 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

line 44 is part of the following:

PHP Code:
function dumpFile($dirArray,$fileName,$content) {
  global 
$path;

  
// Path to where ALL dumped files will start
  
$thisPath $path;

  
// Create $path if it does not exist
  
!file_exists($thisPath);
  if (!
file_exists($thisPath)) {
    
mkdir($thisPath,0755);
  }

  
// Create directory structure as per $dirArray
  
foreach ($dirArray as $dir) {
    
$thisPath $thisPath "/" $dir;
    if (!
file_exists($thisPath)) {
      
mkdir($thisPath,0755);
    }
  }

  
// Append .htm if $fileName has no extension
  
if (!strstr($fileName".")) {
    
$fileName $fileName ".htm";
  }

  
// Put togther the full path and file name
  
$fileName $thisPath "/" $fileName;
  
  
// If $content is empty, there's been an error, output
  // <!-- NULL --> to show that the cannon has at least
  // fired successfully and to prevent the creation of
  // zero byte files.
  
if (strlen($content) < 2) {
    
$content "<!-- NULL -->";
  }

  
// Print status
  
echo "Dumping to ".$fileName."<br>";
  
  
// Write file
  
writeFile($fileName,$content);

specifically it's the first mkdir line.
if a directory doesn't exist, it will attempt to create it.
it probably failed on the first iteration of this... that's the 'archive' directory if you kept the defaults.

what this means is that you need to make the 'forum' directory local writeable so that the script can create the directory.

once it's got one created, the others should be fine as it assigns the relevant permissions as it goes.

you can change the permissions on the forum directoy by telneting in and using the chmod command, something like:

chmod 0755 forum

this should solve it

cheers

david k
Reply With Quote
  #24  
Old 03-31-2002, 10:47 PM
boatdesign's Avatar
boatdesign boatdesign is offline
 
Join Date: Nov 2001
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice! I am excited to see how this progresses. Exactly what I was looking for in my attempt to make my forums more search engine friendly yet at the same time not risk overloading the SQL server due to mod rewrite full speed spiders...
Reply With Quote
  #25  
Old 04-05-2002, 09:53 PM
fastforward fastforward is offline
 
Join Date: Oct 2001
Location: NC, USA
Posts: 399
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How is this progressing Mr Buro9? I'm waiting patiently.
Reply With Quote
  #26  
Old 04-08-2002, 12:16 AM
99SIVTEC 99SIVTEC is offline
 
Join Date: Nov 2001
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome job on this hack. I have it installed over at http://www.sportcompactracing.com/vb...hive/index.htm and at www.haiparts.com/vbulletin/archive/index.htm

The only thing I can suggest is for you to allow us to specify the number of posts to INDEX at once. Mine does fine pulling the threads from the forum, but when it comes to indexing it always times out before it finishes.
Reply With Quote
  #27  
Old 04-17-2002, 10:00 PM
JackG JackG is offline
 
Join Date: Nov 2001
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, I also get the permission error -
But on my Windows IIS the SYSTEM is given
Full Control. Am i missing something?

Thanks in advance.
Reply With Quote
  #28  
Old 04-18-2002, 07:04 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bad news for you all I'm afraid, I've been fighting with safe_mode for the past few weeks and I simply cannot code around it.

Believe me I've tried.

safe_mode is on at my host, and the person I was really making this for also has safe_mode on (though I didn't really appreciate the implications of that!).

Without a way to write files, overwrite them, delete from within PHP and without root permissions this is of no use to me.

As such I'm going to stop development.

It's heavily commented and pretty cleanly laid out (not bad for my first php stab) so if anyone else wants to pick it up, please feel free.

It's good enough to work on all non-safe_mode boxes, and with small tweaks you could add the other features that I had intended.

And if you ever need to to splurge files onto a docroot, it's quite neatly in here

Hope this isn't too much of a blow, but you must appreciate that I've been trying to make this hack for myself, someone here and a few other vb users... all of whom this is useless to.

Though I am considering writing the same thing in PERL and ASP so that we can all have it anyway but not get restricted by a silly option in php.ini

Cheers and thanks for the support... not a bad experience for a first hack, so I'll be tempted to try another one equally ambitious soon

Cheers

David K

http://www.buro9.com/forum/
Reply With Quote
  #29  
Old 04-18-2002, 07:51 PM
jamesdasher jamesdasher is offline
 
Join Date: Oct 2001
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey, buro9 I am not all that good at this kind of thing, but I did like where you were going with it and would like to work with it more. Could you email me what you have?

jamesdasher@wwdb.org

Thanks

James
Reply With Quote
  #30  
Old 05-02-2002, 03:44 AM
Learner29's Avatar
Learner29 Learner29 is offline
 
Join Date: Nov 2001
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

dommage......

it was great to read you guys all over from the very beginning of overgrow's thread to here...
Reply With Quote
  #31  
Old 07-08-2002, 12:06 AM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not working for me:
Quote:
Warning: Unable to jump to row 0 on MySQL result index 6 in d:\web\flatfile\admin\cachecannon.php on line 53
So every single file generated has <!-- NULL --> in it and nothing else.
Reply With Quote
Reply

Thread Tools

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 02:44 AM.


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.04453 seconds
  • Memory Usage 2,314KB
  • Queries Executed 25 (?)
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_php
  • (1)bbcode_quote
  • (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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete