Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-07-2005, 10:43 AM
tfw2005 tfw2005 is offline
 
Join Date: Sep 2004
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default V3 Articles: Mod Rewrite : Archive

Looking for someone to do the following. I gave it a shot, but I couldnt quite get it.

A mod rewrite for articles similar to the forum mod rewrite seen here:

http://www.daniweb.com/techtalkforums/thread9379.html

I have it on my boards, helps immensely.

Second, an articles "archive" per say. I currently have a template driven articles archive in place, but due to the lack of mod rewrite for article urls and category urls, google is not digging it. Seen it in there a couple times, but it keeps on going. Yet I have 5-30 Google Spiders in my forum archives at all times. Both are using the same stylesheet/CSS. So I am thinking it has to be the lack of proper mod rewrite.

You can see my current articles here:
http://www.tfw2005.com/boards/article.php

You can see my attempt at an articles archive here:
http://www.tfw2005.com/boards/article2.php

Even if someone can just make a good rewrite, a full "archive" system may not be necessary. I can make available my article2.php file and the templates using the stripped design/CSS, and it should be good to go for everyone.

Ive seen other article systems, some with archive like support or forum archive support, but I like this one, because it is seperate from the board system. As you can tell, Ive modified the listing pages to be bare bones, and want to keep it that way.

Any help appreciated. Thanks!
Reply With Quote
  #2  
Old 01-07-2005, 11:56 AM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tfw2005
Looking for someone to do the following. I gave it a shot, but I couldnt quite get it.

A mod rewrite for articles similar to the forum mod rewrite seen here:

http://www.daniweb.com/techtalkforums/thread9379.html

I have it on my boards, helps immensely.

Second, an articles "archive" per say. I currently have a template driven articles archive in place, but due to the lack of mod rewrite for article urls and category urls, google is not digging it. Seen it in there a couple times, but it keeps on going. Yet I have 5-30 Google Spiders in my forum archives at all times. Both are using the same stylesheet/CSS. So I am thinking it has to be the lack of proper mod rewrite.

You can see my current articles here:
http://www.tfw2005.com/boards/article.php

You can see my attempt at an articles archive here:
http://www.tfw2005.com/boards/article2.php

Even if someone can just make a good rewrite, a full "archive" system may not be necessary. I can make available my article2.php file and the templates using the stripped design/CSS, and it should be good to go for everyone.

Ive seen other article systems, some with archive like support or forum archive support, but I like this one, because it is seperate from the board system. As you can tell, Ive modified the listing pages to be bare bones, and want to keep it that way.

Any help appreciated. Thanks!
Why is mod_rewrite neccessary? Why can't you just do it like the vB3 standard archive system, where a php file poses as a directory and extracts and uses that path beyond it as the parameters? If you're concerned about having a directory with an extention, you can use a php file without an extention and use forcetype to make apache use it as a php file.
Reply With Quote
  #3  
Old 01-07-2005, 12:18 PM
tfw2005 tfw2005 is offline
 
Join Date: Sep 2004
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I would like mod rewrite for the regular style that all visitors see regardless if it is used in the archive system. Helps minorly with Google Ive found, and, cleaner for linking purposes generally.

As for the archive version, whatever method gets rid of the php strings in the URL I think will suffice, whether it is in the default VB forum archive style, or a mod rewrite style does not matter to me.

I personally dont have the skill set to write an article archive file from scratch like the VB one, and, my attempts at modding the VB forum archive file to work for articles have been unsuccessful.

What I did here, for myself, at least gives me a "printable page" version of the article. One that with a mod-rewrite, will serve it's purpose as an archive.

If you guys can help out in either method, I think alot of people would desire the end result.
Reply With Quote
  #4  
Old 01-07-2005, 10:17 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To access your system by paths instead of parameters, add the following to the .htaccess in the directory containing articles.php , creating the file .htaccess if neccesary:
Code:
<Files article> 
ForceType application/x-httpd-php 
</Files>
Then, make a copy of article.php , renaming it to article without an extention. Add to that file before the c= and a= parameters are decoded:
Code:
//find the path past this file
$pageName='article';
$pageUrl=$_SERVER['REQUEST_URI'];
$pageUrl=substr($pageUrl,strpos($pageUrl,'/'.$pageName)+strlen($pageName)+2);
$fetchType=0; //default to an index load
if(substr($pageUrl,0,2)=='c/'){
  $fetchType=1;
}else if(substr($pageUrl,0,2)=='a/'){
  $fetchType=2;
}
$partNumber=intval(substr($pageUrl,2));
if($partNumber==0){
  $fetchType=0;
}

if($fetchType==1){
  $c=$partNumber;
}else if($fetchType==2){
  $a=$partNumber;
}
If you use $_GET['a'] and $_GET['c'] or $_REQUEST['a'] and $REQUEST['c'], then use those instead of $a and $c in the last 5 lines.

This will allow you to access articles like:
article/a/100
or
article/a/100.html

and catagories like
article/c/100
or
article/c/100.html

Then, change the code to generate this type of URLs and change all image paths to absolute references.
Reply With Quote
  #5  
Old 01-08-2005, 02:44 PM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This will put extra stress on your server though, for extra single page queries in your forum.
Reply With Quote
  #6  
Old 01-19-2005, 05:49 AM
tfw2005 tfw2005 is offline
 
Join Date: Sep 2004
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I utilized a regular styled mod rewrite for both the regular articles section, and the "archive" articles section, which in this method is just a new set of templates with stripped html, streamlined CSS, and the new hardcoded links to the mod rewrites.

After i get my bearings straight, I will try and put together a package with instructions, and the more experienced people here can judge if it is worthy or not, and pick any problems out.

Overall, no change in speed for site, cleaner for direct links, and google has been active in the archive version of it hardcore since it went live. Been watching whos online very closely. Most of my incoming google Guest traffic also now goes to the archive for articles and of course the board archive.

Can see it in action here:

http://www.tfw2005.com/boards/transf...-articles.html

www.tfw2005.com/boards/transformers-archive.php
Reply With Quote
  #7  
Old 01-19-2005, 07:04 PM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The reason we were able to get so much information out without increasing load in the hack defined on dani-web, was soley because of the forumcache; to do the same thing for the articles hack, you will need to create an articlecache to ensure that you can get access to your information, without heavy query load.
Reply With Quote
  #8  
Old 01-20-2005, 01:06 AM
tfw2005 tfw2005 is offline
 
Join Date: Sep 2004
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Natch
The reason we were able to get so much information out without increasing load in the hack defined on dani-web, was soley because of the forumcache; to do the same thing for the articles hack, you will need to create an articlecache to ensure that you can get access to your information, without heavy query load.
Well, the way it is currently set up now, I am not seeing any change in load time/stress. In fact, pages are loading quicker over the last couple days, minus a few server hiccups, which are common here anyway.
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:22 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.10623 seconds
  • Memory Usage 2,244KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete