Witam, odpalilem pligga. Lecz mam pewnien problem. Aby wszystko było jasne, chce zrobić serwis jak 'ala wykop' czyli wchodzisz na serwis, klikasz link i dostajesz strone z iframe.
Wszystko jest ok.. tak jak by, gdyż z chwilą gdy klikam na link, przekierowuje mnie na podstrone w serwisie, ale nie z iframe'em. a Ja chce aby bezposrednio przekierowywał na strone z iframe'em + przyjazne linki dokladnie jak na w wykopie. Przyznam ze nie ogarniam php i tpl'e aby samemu sobie poradzic. Mówimy o www.przestrzal.pl/beta

w zalanczam kod odpowiadajacy za moduł toolbar i tpl odpowiadajacy za wyswietlanie linkow (linia 68) + wycinek z htacces'a odpowiadajacy za linki z toolbara i za 'przyjazne' linki z całego serwisu.

Help! sad.gif

link_summary.tpl - linia 68
  1.  
  2. ...
  3.  
  4. <div class="title" id="title-{$link_shakebox_index}">
  5. <h2>
  6. {checkActionsTpl location="tpl_pligg_story_title_start"}
  7. {if $use_title_as_link eq true}
  8. {if $url_short neq "http://" && $url_short neq "://"}
  9. <a href="{$url}" {if $open_in_new_window eq true} target="_blank"{/if} {if $story_status neq "published"}rel="nofollow"{/if}>{$title_short}</a>
  10. {else}
  11. <a href="{$story_url}" {if $open_in_new_window eq true} target="_blank"{/if}>{$title_short}</a>
  12. {/if}
  13. {else}
  14. {if $pagename eq "story" && $url_short neq "http://" && $url_short neq "://"}
  15. <a href="{$url}" {if $open_in_new_window eq true} target="_blank"{/if} {if $story_status neq "published"}rel="nofollow"{/if}>{$title_short}</a>
  16. {else}
  17. <a href="{sotry_url}">{$title_short}</a>
  18. {/if}
  19. ...



pligg_web_toolbar_main.php
  1. <?php
  2. //require("includes/myfunctions.php");
  3.  
  4. function pligg_web_toolbar_showpage(){
  5. global $main_smarty, $the_template, $db;
  6.  
  7. force_authentication();
  8. $canIhaveAccess = 0;
  9. $canIhaveAccess = $canIhaveAccess + checklevel('god');
  10.  
  11. if($canIhaveAccess == 1)
  12. {
  13. define('pagename', 'pligg_web_toolbar');
  14. $main_smarty->assign('pagename', pagename);
  15.  
  16. // Method for identifying modules rather than pagename
  17. define('modulename', 'pligg_web_toolbar');
  18. $main_smarty->assign('modulename', modulename);
  19.  
  20. $navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
  21. $navwhere['link1'] = getmyurl('admin', '');
  22.  
  23. $navwhere['text2'] = $main_smarty->get_config_vars('PLIGG_pligg_web_toolbar_BreadCrumb');
  24. $navwhere['link2'] = URL_pligg_web_toolbar;
  25.  
  26. $navwhere['text3'] = '';
  27. $navwhere['link3'] = '';
  28. $navwhere['text4'] = '';
  29. $navwhere['link4'] = '';
  30.  
  31. if(isset($_REQUEST['action'])){$action = $_REQUEST['action'];}else{$action = '';}
  32.  
  33. if($action == 'enable'){
  34. enable_pligg_web_toolbar();
  35. }
  36.  
  37. if($action == 'disable'){
  38. disable_pligg_web_toolbar();
  39. }
  40.  
  41.  
  42. $main_smarty = do_sidebar($main_smarty);
  43. $main_smarty->assign('navbar_where', $navwhere);
  44. $main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel'));
  45. $main_smarty->assign('tpl_center', pligg_web_toolbar_tpl_path . 'pligg_web_toolbar_main');
  46.  
  47. $main_smarty->display($template_dir . '/admin/admin.tpl');
  48. } else {
  49. header("Location: " . getmyurl('login', $_SERVER['REQUEST_URI']));
  50. }
  51. }
  52.  
  53. function enable_pligg_web_toolbar(){
  54. misc_data_update('pligg_web_toolbar', "enabled");
  55. header('Location: ' . URL_pligg_web_toolbar);
  56. }
  57.  
  58. function disable_pligg_web_toolbar(){
  59. misc_data_update('pligg_web_toolbar', "disabled");
  60. header('Location: ' . URL_pligg_web_toolbar);
  61. }
  62.  
  63. function pligg_web_toolbar_story(&$vars)
  64. {
  65. if(pligg_web_toolbar == true)
  66. {
  67. global $URLMethod, $my_base_url, $my_pligg_base, $main_smarty, $the_template, $link, $view, $db, $current_user;
  68.  
  69.  
  70. // $_SESSION['linkid'] = 222;//$link->id;
  71. if ($URLMethod==2) {
  72. $link->url = my_base_url.my_pligg_base."/toolbar/".$link->id;
  73. }else{
  74. $link->url = my_base_url.my_pligg_base."/modules/pligg_web_toolbar/toolbar.php?id=".$link->id;
  75. $main_smarty->assign('story_link_id', $link->id);
  76. $main_smarty->assign('current_user_id', $current_user->user_id);
  77.  
  78. }
  79.  
  80.  
  81. }
  82. }
  83.  
  84. ?>


.htaccess

Kod
RewriteRule ^story/([0-9]+)/?$ story.php?id=$1 [L]

RewriteRule ^story/([^/]+)/?$ story.php?title=$1 [L]

RewriteRule ^story/([0-9]+)/editcomment/([0-9]+)/?$ edit.php?id=$1&commentid=$2 [L]

RewriteRule ^story/([0-9]+)/edit/?$ editlink.php?id=$1 [L]



RewriteRule ^toolbar/story/([0-9]+)/(\d+)/?$ modules/pligg_web_toolbar/toolbar.php?id=$1


Na prawdę, nikt mi nie umie pomóc ? sadsmiley02.gif dry.gif