PDA mambot 2.1

This project and information is deprecated. Please visit Mobile Joomla! project at mobilejoomla.com for the latest and best way of mobilize Joomla! web sites. Thank you very much for your support.

Changes in the new version:

  • Now there is no division into “pda-bot” and “pda-subdomain-bot”. All is set up within the framework of one plugin.
  • It is possible to remove optionally pictures (img) and others tags (iframe, object, applet, embed. script) which can seem to you “superfluous” in the version for a pda.
  • It is possible to set a name of a subdomain (not necessarily pda.*).
  • Specially for developers - the global variable $ispda (or $GLOBALS[’ispda’]) is created (accepting value “true” in case of pda-version of a site, and “false” otherwise).
  • It is possible to install and uninstall a patch for joomla cache directly in mambot parameters (in a block of mambot description).
  • And others.

It is shortly planned to publish a series of illustrated articles devoted to installation and adjustment of this plugin.

Don’t forget to uninstall previous version of mambot and template before install new one.

27 Responses to “PDA mambot 2.1”

  1. 1
    fonny Says:

    Dear,

    I am trying to unzip the pda-bot-2.1.zip but there seems to be a compression error.The template unzips fine.

    rg
    Fonny

  2. 2
    Physicist Says:

    fonny:

    I am trying to unzip the pda-bot-2.1.zip but there seems to be a compression error.

    Strange (I unpack it successfully). May be it is because archive contains subfolder. Try tar.gz-version: pda-bot-2.1.tar.gz

  3. 3
    fonny Says:

    Physicist,

    Thanks, unpacks like a charm now.

    gr
    Fonny

  4. 4
    fonny Says:

    Physicist,

    Looks like the bot has a problem when the site is in a subdir.
    I changed pdabot.php (in line 102-103) to :
    # if($botParams->get( ‘homepage’ ) &&
    # ($_SERVER[’REQUEST_URI’]==’/’ || $_SERVER[’REQUEST_URI’]==’/index.php’) )
    $uri = str_replace ($_SERVER[’REQUEST_URI’], ‘/’, $_SERVER[’SCRIPT_NAME’]);
    if($botParams->get( ‘homepage’ ) && ($_SERVER[’REQUEST_URI’]==’/’ || $uri==’/index.php’) )

    Now the bot is redirecting to the right url

    gr
    Fonny

  5. 5
    Physicist Says:

    Thanks.
    But right way must be like:

    $parsed=parse_url($mosConfig_live_site);
    $path=isset($parsed['path'])?$parsed['path']:'';
    
    $subdomain=$botParams->get('subdomainname').'.';
    if( $botParams->get( 'subdomain' ) &&
       substr($_SERVER['HTTP_HOST'],0,strlen($subdomain))==$subdomain )
    {
    	$mosConfig_live_site='http://'.$_SERVER['HTTP_HOST'].$path;
    	$GLOBALS['ispda']=true;
    }
    
    if( $botParams->get( 'useragent' ) && CheckAgent() )
    {
    	$GLOBALS['ispda']=true;
    }
    
    if( $GLOBALS['ispda'] )
    {
    	$_COOKIE['jos_user_template']=$botParams->get( 'pdatemplate' );
    	$homepage=$botParams->get( 'homepage' );
    	if($homepage && ($_SERVER['REQUEST_URI']==$path.'/' || $_SERVER['REQUEST_URI']==$path.'/index.php') )
    	{
    		$GLOBALS['pdahome']=1;
    		$_SERVER['REQUEST_URI']=$path.'/'.$homepage;
    		if(substr($homepage,0,10)=='index.php?')
    		{
    			$_SERVER['QUERY_STRING']=substr($homepage,10);
    			parse_str($_SERVER['QUERY_STRING'],$_REQUEST);
    		}
    	}
    }
    
  6. 6
    Physicist Says:

    I’ve updated pda-bot-2.1 distributive. Above discussed problem fixed (I hope).

  7. 7
    fonny Says:

    Hi,

    pda-bot.2.1.zip has still the same problem. Subfolders shouldn’t be a problem as template has also one.
    If it can help you I am working on a Mac.

    Have manually made fixes and seems to work.
    Thanks for the assistance.

    gr
    Fonny

  8. 8
    Physicist Says:

    What is your joomla settings?
    1. Joomla version
    2. Cache (On/Off)
    3. SEF (On/Off)
    4. Full site address (e.g. http://localhost/joomla/)
    5. PDA device
    6. Address you set for pda-homepage

  9. 9
    fonny Says:

    I am just extracting the file local on my system. No Joomla involved.
    Using Mac OSX 10.4.10

    Double-click on the template.zip -> no problem
    Double-click on the bot give error : unable to unarchive ‘pda-bot-2.1.zip’ into ‘Desktop’. (Error 1 - Operation not permitted.)

  10. 10
    Physicist Says:

    fonny:

    Double-click on the bot give error : unable to unarchive ‘pda-bot-2.1.zip’ into ‘Desktop’. (Error 1 - Operation not permitted.)

    I had no problem in opening this file (I use 7-zip). To make sure I had uploaded both zip and tar.gz archives (see links in the post).

    By the way, Joomla! unpack and install this zip archive without problem.

  11. 11
    fonny Says:

    The tar.gz doesn’t give me any problem.
    Must be that zipper has a problem in OSX where Joomla is perhaps located on a Linux host.

    gr
    Fonny

  12. 12
    sky Says:

    Has anyone got non-English UTF-8 content displayed correctly with this bot? I have everything set to utf8, but still could not have the content displayed correctly in pda emulator.

  13. 13
    Physicist Says:

    sky:

    Has anyone got non-English UTF-8 content displayed correctly with this bot? I have everything set to utf8, but still could not have the content displayed correctly in pda emulator.

    What is codepage of your site and which pda emulator do you use?

    Note that you need PHP with iconv library to convertation to utf-8 work well.

  14. 14
    Gaboinked! Says:

    Any chance that you can add the User Agent for the iPhone? I am building a site specific for this device and it would greatly help. Is the an easy way to add it ourselves?

    Thanks.

  15. 15
    Physicist Says:

    Gaboinked!:

    Any chance that you can add the User Agent for the iPhone? I am building a site specific for this device and it would greatly help. Is the an easy way to add it ourselves?

    What is user agent name of the iPhone?

  16. 16
    nabil khan Says:

    Hello I am a newbie and I really liek this idea, I have downloaded both downloads, now I dont know how to seperate the regular site from the PDA site, can some one give me a set by step set of instructions so I can figure out how to do this.

    Thanks a lot I love this stuff, am going to donate as soon as it starts working

  17. 17
    GenericWhiteGuy Says:

    Is there an easy way to remove iphone/touch from the list of pda user agents? The iphone does a great job rendering the normal page and it would be a shame to force a pda version on it. Here’s a typical iphone user agent string

    | Mozilla/5.0 (iPhone; U; XXXXX like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/241 Safari/419.3 |

  18. 18
    GenericWhiteGuy Says:

    as a follow-up, I just noticed the comment above asking to add the user-agent for the iphone. Mine already detects that I’m using an iphone… I’m guessing the “mobile” element in the $pdas array is what is being picked up.

    So, could there be a if iphone, return false?

  19. 19
    GenericWhiteGuy Says:

    Very bad form to follow up to a follow-up, but…

    In reply to 14-Gaboinked!, the pda mambot will detect an iphone/touch as a mobile device and apply the moble template by default.

    In reply to myself, simply removing “mobile” from the $pdas array in mambots/system/pdabot.php will allow the iphone to browse the normal site. My only other device to test is a windows mobile phone and that still shows the pda formatted version of the site. I’m not sure if any other devices are specifically identified only by “mobile” in the user agent string, so this might not be an ideal solution but it works for me so far.

  20. 20
    Physicist Says:

    nabil khan:
    Read http://joomup.com/blog/2007/10/29/pdamambot-guide/
    Update: and http://dev.mobi/node/721

  21. 21
    bart bakker Says:

    Hello,
    can some one help me with this problem i installed pda mambot on joomla 1.5 nl and i get the following message when i tried to go to the site even the admin is not working

    Direct Access to this location is not allowed.

    Bart Bakker

  22. 22
    Physicist Says:

    bart bakker:
    To solve the problem you should make empty (via FTP) the file /plugins/system/pdabot.php or /plugins/system/mobilebot.php (depending on version 2.x/3.0) and then uninstall mambot and template in backend.

  23. 23
    Salman Says:

    Can you please explain what do you mean by "make empty (via FTP)"? do you mean we need to delete this file or remove all the text from the pdabot.php file?

  24. 24
    Physicist Says:

    Remove all the text from the pdabot.php file

  25. 25
    thomtom Says:

    Hey guys,

    i´ve installed the pda mambot 2.1.2, but the redirection will not work. i´ve created a subdomain called iphone and i want to redirect the normal site if someone want to visit ist with a pda. But it willnot work.

    All settings are made and will be correct but when i visit the site it wont be redirkt to the subdomain. And now as i turned on the mod_rewrite for joomla core seo the mambot will not not work.

    Dows somebody else have this problem and can tell me a solution???

  26. 26
    providence Says:

    Hi, how can I disable specific modules for PDA Plugin?

  27. 27
    Physicist Says:

    providence, I recommend you to read an article http://www.mobiforge.com/developing/story/mobile-sites-with-joomla-cms

You can follow any responses to this entry through the RSS 2.0 feed.

Leave a Reply