Your SlideShare is downloading. ×
  • Like
SugarCRM勉強会#001 SugarCRMをCMSとして活用
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

SugarCRM勉強会#001 SugarCRMをCMSとして活用

  • 1,571 views
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,571
On SlideShare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. SugarCRM CMS CogniTom Academic Design kawamura@cognitom.com 2009 9 30
  • 2. Why? • • • DB • (?) • WEB → 2009 9 30
  • 3. • Sugar • 2009 9 30
  • 4. • • • • • • •SugarCRM 2009 9 30
  • 5. • WebPages : • WebNews : • WebParts : ( ) • WebRegistries : • WebProducts : ...etc. 2009 9 30
  • 6. EditView • TinyMCE ← Sugar 31. $viewdefs['WebPages']['EditView'] = array( 32. 'templateMeta' => array ( 33. 'form' => array (... ...), 34. 'maxColumns' => '3', 35. 'widths' => array (... ...), 36. 'javascript' => ' 37. <script type="text/javascript" src="include/javascript/tiny_mce/tiny_mce.js"></script> 38. <script type="text/javascript"> 39. {literal} 40. tinyMCE.init({ 41. mode: "exact", 42. elements: "contents", 43. theme: "advanced", 44. language: "ja_utf-8", 45. relative_urls: false, 46. plugins: "table", 47. ... ... 48. }); 49. {/literal} 50. </script> 51. ', 52. ), 2009 9 30
  • 7. Tin yM CE 2009 9 30
  • 8. • httpdocs/ SSL • .htaccess index.php • index.php Sugar • httpsdocs/ SSL • .htaccess index.php • index.php Sugar • sugar/ • index.php Sugar • include/entryPoint.php •• modules/ WebPages/ • entry_point_registry.php • public/sample.php • tpls/sample.html 2009 9 30
  • 9. • /.htaccess • /index.php • /sugar/include/entryPoint.php • /sugar/modules/WebPages/entry_point_registry.php • /sugar/modules/WebPages/public/home.php • /sugar/modules/WebPages/tpls/public.home.html 2009 9 30
  • 10. entryPoint • entryPoint /sugar/modules/WebPages/entry_point_registry.php index.php?module=WebNews&entryPoint=list&year=2009 37. $entry_point_registry['list'] = array('file' => 'modules/WebProducts/public/list.php', 'auth' => false); 38. $entry_point_registry['detail'] = array('file' => 'modules/WebProducts/public/detail.php', 'auth' => false); 2009 9 30
  • 11. • .htaccess index.php 3. RewriteEngine On 4. RewriteCond %{REQUEST_FILENAME} !-f 5. RewriteCond %{REQUEST_FILENAME} !-d 6. RewriteRule ^(.*)$ index.php [L,QSA] 2009 9 30
  • 12. • PHP Sugar /httpdocs/ → /httpsdocs/sugar/ 2. chdir('../httpsdocs/sugar');//Sugar 2009 9 30
  • 13. • REQUEST_URI 9. if (preg_match('/^/news/(?<year>d+)/(?<month>d+)//', $path, $matches)) $route = array( 'module' => 'WebNews', 'entryPoint' => 'list', 'year' => $matches['year'], 'month' => $matches['month'] ); 10. else { header("HTTP/1.0 404 Not Found"); die(" "); } 11. $_REQUEST = array_merge($_REQUEST, $route); 2009 9 30
  • 14. 31. // 32. define('sugarEntry', true); 33. $startTime = microtime(true); 34. require_once('include/entryPoint.php'); 35. 36. //WEB 37. require_once('modules/Users/User.php'); 38. global $current_user; 39. $current_user = new User(); 40. $current_user->retrieve($current_user->retrieve_user_id('webuser')); 41. 42. // 43. ob_start(); 44. require_once('include/MVC/SugarApplication.php'); 45. $app = new SugarApplication(); 46. $app->startSession(); 47. $app->execute(); 2009 9 30
  • 15. • Smarty 31. //Smarty 32. $ss = new Sugar_Smarty(); 33. $ss->assign('MOD', $GLOBALS['mod_strings']); 34. $ss->assign('APL', $GLOBALS['app_list_strings']); 35. $ss->assign('page', $page); 36. $ss->assign('page_siblings', $page_siblings); 37. $ss->assign('toppage_message', $toppage_message); 38. $ss->assign('news', $news); 39. $ss->assign('global_links', $global_links); 41. // 42. echo $ss->fetch('modules/WebPages/tpls/public.home.html'); >> Espresso 2009 9 30
  • 16. • 8. $page = new WebPage(); 9. $page->retrieve_by_string_fields(array('search_key'=>'home', 'language'=>'ja')); 2009 9 30
  • 17. • 31. $focus = new WebNewsArticle(); 32. $result = $focus->get_list('date desc', “YEAR(date) = {$year}”, 0, 20); 33. $news = $result['list']; 2009 9 30