Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Użycie dotaku do Joomli bez Joomli
Maker3
post
Post #1





Grupa: Zarejestrowani
Postów: 17
Pomógł: 0
Dołączył: 23.09.2006

Ostrzeżenie: (0%)
-----


Chciałem użyc pewnego dodatku do CMS Joomla, problem lezy w tym, że moja strona nie jest oparta o Joomle.

To jest kod tego dodatku. Gdy go wstawiam pojawia się tekst "Direct Access to this location is not allowed." Podejrzewam o co tu chodzi, jednak nie mam dostatecznek wiedzy na temat php. W instrukcji dodatku pisało, że trzeba go opublikować w panelu admina joomli, aby działał. Skoro nie mam Joomli, no to skrypt nie ma jak sprawdzić czy został już opublikowany. I tu pojawia się moje pytanie co trzeba zmienić, aby nie sprawdzane było czy dodatek jest opublikowany?
  1. <?php
  2. /**
  3. * @version $Id: jogadgets.php,v 0.1 2006/01/11 12:28:13 Artur Heinze Exp $
  4. * @package Joomla
  5. * @subpackage Jogadgets
  6. * @copyright (C) 2006 Artur Heinze
  7. * @license mambot <a href="http://www.gnu.org/copyleft/gpl.html" target="_blank">http://www.gnu.org/copyleft/gpl.html</a> GNU/GPL
  8. * @author Artur Heinze www.jogadgets.com
  9. * Joomla is Free Open Source Software
  10. */
  11.  
  12.  
  13. /** ensure this file is being included by a parent file */
  14. defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
  15.  
  16. /**
  17. ** Usage:
  18. * ...see documentation...
  19. */
  20.  
  21.  
  22. $_MAMBOTS->registerFunction( 'onPrepareContent', 'botJOGADGETS' );
  23.  
  24. //include joGadgets-Framework
  25. include_once('_jgfw_/jgfw.php');
  26.  
  27. $GLOBALS['jgw']->modulemode = false;
  28.  
  29. function botJOGADGETS( $published, &$row, &$params, $page=0 ) {
  30.  
  31. // check whether mambot has been unpublished
  32. if (!$published) {
  33. return;
  34. }
  35.  
  36. //check whether to perform parsing on content
  37. if(preg_match('/{jgexit}/i', $row->text)){
  38. $row->text = str_replace('{jgexit}', '', $row->text);
  39. return;
  40. }
  41.  
  42. //Imagetitles
  43. if($GLOBALS['confJG']['useimgtitle']==true){
  44. $style= 'display:block;height:'.$GLOBALS['confJG']['imgtitle_height'];
  45.  
  46. // perform the replacement
  47. $row->title = '<div style="'.$style.';background:url(_jgfw_/image.php?text='.urlencode(strip_tags($row->title)).') no-repeat;"> </div>';
  48. }
  49.  
  50. $row->text = $GLOBALS['jgw']->doparse($row->text);
  51.  
  52. return true;
  53.  
  54. }
  55.  
  56.  
  57.  
  58.  
  59.  
  60. ?>


Ten post edytował Maker3 11.03.2007, 13:48:52
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
devnul
post
Post #2





Grupa: Zarejestrowani
Postów: 1 470
Pomógł: 75
Dołączył: 21.09.2005
Skąd: że znowu

Ostrzeżenie: (0%)
-----


nie wiedząc nawet pod jakiego cms'a ma być docelowo przerobiony komponent nie za wiele da sie zrobić
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 28.12.2025 - 15:34