[ABD][RC1] Lo-Fi Mod 1.0.0

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Bicet
Registered User
Posts: 58
Joined: Mon Nov 15, 2004 6:52 am
Location: IperUranium
Contact:

[ABD][RC1] Lo-Fi Mod 1.0.0

Post by Bicet »

This is a mod inspired on the way of working of Invision Power Board. it adds in the copyright area a small Link to a Lo-Fi Mod, so it will be simplier to print topic and stuff like that. It's also a good way for making google better spiders your site. Now it supports all major search engines.

It requires eXtreme Styles Mod 2.2.1 ( you can grab it here: http://www.phpbbstyles.com/viewtopic.php?t=356 )

Conseder this RC1 like a final version it's just a RC version because of rules of phpbb.com!

Here's the changelog

Code: Select all

##############################################################
## MOD Title: Lo-Fi Mod
## MOD Author: Bicet < bicets@gmail.com > (Nicola Tonon) http://www.phpbbxs.com
## MOD Author, secondary: CyberAlien < no@pubblic.email > (Vjacheslav Trushkin) http://www.phpbbstyles.com
## MOD Author, secondary: Justas < mjomble@gmail.com > (Justas) http://www.beaverandsteve.com/forum
## MOD Description: This Mod will add a Textual/Low Graphic Layout to your
##                  Board. It's Ideal for Google Bot and for all Search Engine that
##                  spider your site, and also for printing in an easy way.
##                  It requires eXtreme Styles mod 2 from CyberAlien, you can find it
##                  here: http://www.phpbbstyles.com/viewtopic.php?t=356
## MOD Version: 1.0.0RC1
## 
## Installation Level: Easy
## Installation Time: 24 minutes (< 1 min. with EasyMod)
## Files To Edit: 11
##				  common.php
##                posting.php
##                privmsg.php
##                viewforum.php
##                viewtopic.php
##                includes/page_tail.php
##                includes/sessions.php
##                includes/topic_review.php
##                language/lang_english/lang_main.php
##                templates/subSilver/overall_footer.tpl
##                templates/subSilver/posting_body.tpl
## Included Files: 21
##				   root/robots.txt
##                 root/templates/subSilver/xs.cfg
##                 root/templates/subSilver/lofi/bots/lofi_bots_footer.tpl
##                 root/templates/subSilver/lofi/bots/lofi_bots_forum.tpl
##                 root/templates/subSilver/lofi/bots/lofi_bots_header.tpl
##                 root/templates/subSilver/lofi/bots/lofi_bots_index.tpl
##                 root/templates/subSilver/lofi/bots/lofi_bots_topic.tpl
##                 root/templates/subSilver/lofi/lofi.css
##                 root/templates/subSilver/lofi/lofi_footer.tpl
##                 root/templates/subSilver/lofi/lofi_forum.tpl
##                 root/templates/subSilver/lofi/lofi_groupcp_info.tpl
##                 root/templates/subSilver/lofi/lofi_groupcp_user.tpl
##                 root/templates/subSilver/lofi/lofi_header.tpl
##                 root/templates/subSilver/lofi/lofi_index.tpl
##                 root/templates/subSilver/lofi/lofi_memberlist.tpl
##                 root/templates/subSilver/lofi/lofi_pm.tpl
##                 root/templates/subSilver/lofi/lofi_pm_read.tpl
##                 root/templates/subSilver/lofi/lofi_profile.tpl
##                 root/templates/subSilver/lofi/lofi_topic.tpl
##                 root/templates/subSilver/lofi/lofi_topic_review.tpl
##                 root/templates/subSilver/lofi/scripts.js
## 
##############################################################
## Author Notes:  -Important:
##    If You're using any other template different form SubSilver take a look
##    at the contrib folder, where you can find detailed instruction.
## 
## 
##  1. Copyright and special thanks!
##  -----------
##  This MOD try to fully emulate Lo-Fi Version like in Invision Power Board
##  A Special Thank goes to Cyber Alien who gives me the first rough code.
## 
## 
##  2. EasyMOD
##  -----------
##  This MOD is compatible with EasyMOD of Nuttzy and can be
##  installed by it but is not yet certified EMC (EasyMOD Compliant)!
##  http://area51.phpbb.com/phpBB22/viewforum.php?sid=&f=15
## 
##  However, on alpha releases of EM and meanwhile beta or 
##  final release some actions are NOT performed.
##  You'll have to do them manually !
## 
##  2.1 Translation are not managed
##  -----------
##  Moreover, EM can not already manage actions for any other
##  language than English (but language intructions are proceed
##  to all installed languages in order to prevent errors).
##  So the translations provided with this MOD must be installed
##  manually if you need them. Take a look in contrib directory.
## 
##  4. Official last version link
##  -----------
##  Meanwhile the phpBB group validation and as the MOD is not yet
##  in the phpBB MOD database, check this official link for updates...
##  http://www.vagito.net
## 
##  5. TO DO:
##  -----------
##  Make the mods compatible with Categories Hierarchy
##############################################################
## MOD History:
## 
##
##   2005-09-11 - Version 1.0.0
## 
##       - Fixed some small Glitches with poll
##
##
##   2005-06-02 - Version 0.0.4
## 
##       - Removed all smilies and signature (credits go to Justas, who tell me how to do it ;))
##       - Added all buttons to viewtopic.php (idea and all credits go to Justas)
##       - Added an auto-update files that check for the last version of mod
##       - Added link to profile on poster name.
##       - Added a quick reply form (based on CyberAlien quick reply)
##       - Added moderation's control on viewtopic
## 
##   2005-05-30 - Version 0.0.3
## 
##       - Small Updates to the css, now the lo-fi version looks cooler,added
##         support for code&quote.
##       - Added robot.txt so search engines can spider your site in a better way.
##       - Added removal of SID for search engines.
##       - Added A Navigation Toolbar to the Lo-Fi version, now users can completely
##         browse the forum
## 
##   2005-05-25 - Version 0.0.2
## 
##       - Added Support for bot of Major Search Engines
##         (Google, Alexa, Inktomi, Infoseek, Alta Vista, Lycos, FAST,
##         wisenut, MSN, Looksmart, Ask Jeeves, Gigablast,Baidu, Picsearch,
##         Become...)
##       - Added A Navigation Toolbar to the Lo-Fi version, now users can completely
##         browse the forum
##       - Added some css adjustment for a better Look
## 
##   2005-05-13 - Version 0.0.1
## 
##       - Initial release
## 
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################
You can download it here:
http://www.phpbbxs.com/lo-fi-mod-vt3.html

You can preview it here:
http://www.phpbbxs.com/index.php?lofi=1
Last edited by Bicet on Wed Nov 09, 2005 7:52 am, edited 6 times in total.
DKing
Registered User
Posts: 751
Joined: Sat Jul 03, 2004 8:38 pm

Post by DKing »

This looks really nice! Good work!

-DKing
-DKing
Latest phpBB Version: 2.0.21
Search For a MOD: MOD Search
Bicet
Registered User
Posts: 58
Joined: Mon Nov 15, 2004 6:52 am
Location: IperUranium
Contact:

Post by Bicet »

Thnx a lot ;)
:P
wrongen
Registered User
Posts: 23
Joined: Sun Apr 10, 2005 11:44 pm

Post by wrongen »

not bad this is really good for people when they want to view the forum quicky and for dial up user's.
User avatar
SunZeroX
Registered User
Posts: 70
Joined: Sun Aug 15, 2004 7:40 pm
Contact:

Post by SunZeroX »

Finally an usefull mod is released again!
twister17e
Registered User
Posts: 187
Joined: Tue Aug 17, 2004 9:31 pm
Contact:

Post by twister17e »

Cool mod, I am going to add it to my two forums :D.

Just one question though, any way to force Google and other search bots to use the lo-fi version?
User avatar
onigumo
Registered User
Posts: 1755
Joined: Fri Oct 31, 2003 2:32 am
Contact:

Post by onigumo »

Hey, awesome mod. Please keep up development!
I write articles on community building
@ The Infinity Program.
Bicet
Registered User
Posts: 58
Joined: Mon Nov 15, 2004 6:52 am
Location: IperUranium
Contact:

Post by Bicet »

Forcing google to use the lo-fi version is very simple ;)

Open templates/subSilver/xs.cfg

FIND

Code: Select all

if(isset($_GET['lofi']))
BEFORE ADD

Code: Select all

$browser = isset($_SERVER['HTTP_USER_AGENT']) ? trim($_SERVER['HTTP_USER_AGENT']) : '';  
$googlebot = false;  
if(substr($browser, 0, 6) === 'msnbot')    $googlebot = true;    // "msnbot/0.11 (+http://search.msn.com/msnbot.htm)"  
elseif($browser === 'Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)')    $googlebot = true;  
elseif(substr($browser, 0, 10) === 'Googlebot/') $googlebot = true; // "Googlebot/2.1 (+http://www.google.com/bot.html)"  
elseif(substr($browser, 0, 6) === 'Jetbot') $googlebot = true; // "Jetbot/1.0"  
elseif($browser === 'ia_archiver') $googlebot = true; // "ia_archiver"  
elseif(substr($browser, 0, 8) === 'Seekbot/') $googlebot = true; // Seekbot/1.0 (http://www.seekbot.net/bot.html) HTTPFetcher/0.3  
elseif(strpos($browser, 'BecomeBot/') !== false) $googlebot = true; // "Mozilla/5.0 (compatible; BecomeBot/1.23; +http://www.become.com/webmasters.html)"  
elseif(substr($browser, 0, 6) === 'psbot/') $googlebot = true; // psbot/0.1 (+http://www.picsearch.com/bot.html)  
elseif(substr($browser, 0, 12) === 'Baiduspider+') $googlebot = true; // Baiduspider+(+http://www.baidu.com/search/spider.htm)  
elseif(substr($browser, 0, 8) === 'Gigabot/') $googlebot = true; // Gigabot/2.0 (gigablast.com)  
 
if($googlebot)  
{  
	$replace['overall_header.tpl'] = 'lofi/lofi_header.tpl';  
	$replace['overall_footer.tpl'] = 'lofi/lofi_footer.tpl';  
	$replace['index_body.tpl'] = 'lofi/lofi_index.tpl';  
	$replace['viewforum_body.tpl'] = 'lofi/lofi_forum.tpl';  
	$replace['viewtopic_body.tpl'] = 'lofi/lofi_topic.tpl';  
}  
I can Add this lines to the mod if you like it in this way ;)
twister17e
Registered User
Posts: 187
Joined: Tue Aug 17, 2004 9:31 pm
Contact:

Post by twister17e »

Excellent thank you, I think you should include this in the mod :P .
User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3515
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer »

It would be great to have code for the major search bots already part of the mod. I'll make a quick list: Google, Yahoo, Altavista, MSN, Ask Jeeves, Lycos, and A9(Amazon.com).
William Jacoby - Community Team
Knowledge Base | phpBB Board Rules | Search Customisation Database
Please don't contact me via PM or email for phpBB support .
Bicet
Registered User
Posts: 58
Joined: Mon Nov 15, 2004 6:52 am
Location: IperUranium
Contact:

Post by Bicet »

I will add all search engine and make another release
DKing
Registered User
Posts: 751
Joined: Sat Jul 03, 2004 8:38 pm

Post by DKing »

I checked back there... is there any chance that you will be adding a navigation system and such so that users can edit their profile and check PMs? I didn't see one...
-DKing
Latest phpBB Version: 2.0.21
Search For a MOD: MOD Search
Bicet
Registered User
Posts: 58
Joined: Mon Nov 15, 2004 6:52 am
Location: IperUranium
Contact:

Post by Bicet »

This mod is highly optimized for search engines, so adding a navigation system will make this mod just useless.

But I think I can made one for search engines and one for Lo-Fi navigation.
I will work on it on the next days, cause now I'm just a little busy. But I think that before Tuesday I will make all the changes.

Overall I'll appreciate all feedbacks and suggestion are very welcome.
Latest Mods:
[ Lo-Fi Mod 1.0.0 rc1 | phpBB XS 2 ]
whatusername
Registered User
Posts: 35
Joined: Fri Feb 25, 2005 1:23 pm
Contact:

Post by whatusername »

Would this work even though you don't have mod_rewrite?
User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3515
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer »

Yes it will. All it is doing is checking to see what the BOT identifies itself as. If it identifies as a plain Browser then it will be in the default skin, if it says I'm GoogleBot, then it serves the Lo-FI templates instead. This is all done in PHP.
William Jacoby - Community Team
Knowledge Base | phpBB Board Rules | Search Customisation Database
Please don't contact me via PM or email for phpBB support .
Locked

Return to “[2.0.x] MODs in Development”