Autore Topic: Inserire jogadget nel componente registrazione  (Letto 2351 volte)

Offline matrix845

  • Appassionato
  • ***
  • Post: 483
    • Mostra profilo
Inserire jogadget nel componente registrazione
« il: 19 Mar 2007, 00:35:11 »
Ciao ragazzi , sto provando questo bot , molto interessante , specialmente la funzione lightbox testaule : http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,566/Itemid,35/

Mi è venuta la malsana idea di iserirla nel componete registrazione di default di joomla , visto che lo stesso bot permette dii essere usato in altri componenti/moduli , infatti nel readme , che riporto , leggere cosa dice alla fine :
Citazione
Artur Heinze
JOGADGETS.com

0.44 ALPHA
_______________________________________ _______________________________________ __


1. HOW TO INSTALL
2. HOW TO USE
3. HOW TO INCLUDE IN OWN COMPONENTS/MODULES



1. HOW TO INSTALL
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xx

Extract the folder "_jgfw_" (zipped in _jgfw_.zip) to your
Joomla installation root (e.g. "www.yoursite/cms/").

Then install the jogadgets mambot/plugin (zipped in jogadgets.zip).
Don't forget to activate it (Administration->Mambots->Site Mambots).



2. HOW TO USE (in a content item)
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xx

OK, let's get the candy stuff:

--------------------------------------------------------------------------------
- Imagetitle: trasforma i titoli dei contenuti in img , x definire come si creano ste img sto vedendo!!!;-)
--------------------------------------------------------------------------------
  It's deactivated by default. To turn on, just edit "jgconfig.php" in
  the "_jgfw_" folder. Make sure that in the template_css.css of your
  active template the following code is included:
 
  ==
  table.contentpaneopen{
  width: 100%;
   }
   
   td.contentheading{
     width: 100%;
   }
   ==
   !the width-attribute is very important!
 
--------------------------------------------------------------------------------
- Candy thumb-function: lightbox di una sola immagine , anche png
--------------------------------------------------------------------------------
  {jgxtimg src:=[path/image.jpg] width:=[320]}
 
 
-------------------------------------------------------------------------------- 
- Candy gallery: gallery con lightbox , ordina le img da solo , da vedere come funziona con il tuo stesso jpg rotator
--------------------------------------------------------------------------------
  {jgxgal folder:=[path/folder] cols:=[4]}
 
 
--------------------------------------------------------------------------------
- Include .flv videos: (outdated! use jgmedia)
--------------------------------------------------------------------------------
  {jgflv file:=[path/video.flv] width:=[386] height:=[288] autostart:=[false]}
 
  !the right width and height is important!
 
 
-------------------------------------------------------------------------------- 
- Mp3 player: (outdated! use jgmedia)
--------------------------------------------------------------------------------
  you can play just one specific mp3-file:
 
  {jgmp3 file:=[path/song.mp3]}
 
  or play tracks from a playlist:
 
    {jgmp3 file:=[path/songlist.xml]}
    (You can find a sample Tracklist in _jgfw_/files/example_playlist.xml)
 
-------------------------------------------------------------------------------- 
- Include media files:
--------------------------------------------------------------------------------
  play wmv,wmy,avi,mpg,mpeg,mov,swf,flv,mp3 files.
  {jgmedia file:=[path/mediafile] width:=[386] height:=[288] autostart:=[false]}
 
 
--------------------------------------------------------------------------------
- Infobox ( slide colorata):
--------------------------------------------------------------------------------
  {jgibox title:=[Test (click me)] style:=[width:320px;]}YOUR TEXT{/jgibox}
 
 
--------------------------------------------------------------------------------
- Tabber: tabs!
--------------------------------------------------------------------------------
  {jgtabber}
    [tab ==Tab 1==]Content 1[/tab]
    [tab ==Tab 2==]Content 2[/tab]
    [tab ==Tab 3==]Content 3[/tab]
  {/jgtabber}


--------------------------------------------------------------------------------
- Tooltips: Commento colorato
--------------------------------------------------------------------------------
   {jgtip text:=[description tooltip]}...content...{/jgtip}
   
   
--------------------------------------------------------------------------------
- Textimage: ( immagine testuale senza lightbox)
--------------------------------------------------------------------------------
   {jgitext text:=[Hello World!] size:=[30] color:=[000000] bgcolor:=[ffffff] font:=[fontname.ttf]}
   
   the defined font must be located in jgfw_/font/

--------------------------------------------------------------------------------
- Content-box: lightbox testuale
--------------------------------------------------------------------------------
   {jgbox linktext:=[open box]}...content to show...{/jgbox}


--------------------------------------------------------------------------------
- Accordion :slide!
--------------------------------------------------------------------------------
  {jgaccordion}
    [acctab ==Tab 1==]Content 1[/acctab]
    [acctab ==Tab 2==]Content 2[/acctab]
    [acctab ==Tab 3==]Content 3[/acctab]
  {/jgaccordion}


--------------------------------------------------------------------------------
- Quotes: quota in un box giallo , con la lampadina...molto carino
--------------------------------------------------------------------------------
   {jgquote}...quote content to show...{/jgquote}

--------------------------------------------------------------------------------
- Include (php) files into content:
--------------------------------------------------------------------------------
   {jgfile file:=[path/filename]}

--------------------------------------------------------------------------------
- Flash-Image-Rotator: rotazione immagini , senza / ne prima ne dopo nel path
--------------------------------------------------------------------------------
    {jgrotator folder:=[path] width:=[400] height:=[300]}


! Attention: !
_______________________________________ ________________________________

The Brackets "eg file:=![!...!]!" are required.
Have in mind, that if you give a path information, it is always relative to
the index.php int the Joomla root folder. Just an example:

{jgxtimg src:=[images/joomla_logo_black.jpg] width:=[320]}



3. HOW TO INCLUDE IN OWN COMPONENTS/MODULES  (for developers only!)
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xx

--------------------------------------------------------------------------------
- Include JoGadgets in your Components:
--------------------------------------------------------------------------------
  //include joGadgets-Framework
  include_once('_jgfw_/jgfw.php');
  $GLOBALS['jgw']->modulemode = false;

--------------------------------------------------------------------------------
- Include JoGadgets in your Modules:
--------------------------------------------------------------------------------
  //include joGadgets-Framework
  include_once('_jgfw_/jgfw.php');
  $GLOBALS['jgw']->modulinit();

--------------------------------------------------------------------------------
Methods you can use (returns always a string):

$GLOBALS['jgw']->tooltip($text,$prmlist = array());
$GLOBALS['jgw']->quote($text,$prmlist = array());
$GLOBALS['jgw']->imagetext($text,$prmlist = array());
$GLOBALS['jgw']->lightboxgallery($prmlist = array());
$GLOBALS['jgw']->lightboximage($prmlist = array());
$GLOBALS['jgw']->media($prmlist = array());

$GLOBALS['jgw']->doparse($text); <- parse $text for mambot syntax.



This is just a try to give you a quick-start. I'll try to set-up a more
detailed documentation on http://www.jogadgets.com


Greets

Artur Heinze (kutulik@gmx.de)



di inserire la prima stringa per richiamare il bot , e le seconde per richiamare le funzioni....bene , a parole sembra tutto facile , ma io ho provato ad inserirle nel file registration.html.php , ma non va , ij pratica a me servirebbero per creare due click con lightbox con delle info aggiuntive per il download , e comunque per capire come si integra in altri componenti...

Sapete aiutarmi?

Per comodità riporto il file registration.html.php
Citazione
<?php
/**
* @version $Id: registration.html.php 5928 2006-12-06 00:49:07Z friesengeist $
* @package Joomla
* @subpackage Users
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );

/**
* @package Joomla
* @subpackage Users
*/
class HTML_registration {
   function lostPassForm($option) {
      // used for spoof hardening
      $validate = josSpoofValue();
      ?>
      <form action="index.php" method="post">

      <div class="componentheading">
         <?php echo _PROMPT_PASSWORD; ?>
      </div>

      <table cellpadding="0" cellspacing="0" border="0" width="100%" class="contentpane">
      <tr>
         <td colspan="2">
            <?php echo _NEW_PASS_DESC; ?>
         </td>
      </tr>
      <tr>
         <td>
            <?php echo _PROMPT_UNAME; ?>
         </td>
         <td>
            <input type="text" name="checkusername" class="inputbox" size="40" maxlength="25" />
         </td>
      </tr>
      <tr>
         <td>
            <?php echo _PROMPT_EMAIL; ?>
         </td>
         <td>
            <input type="text" name="confirmEmail" class="inputbox" size="40" />
         </td>
      </tr>
      <tr>
         <td colspan="2">
            <input type="submit" class="button" value="<?php echo _BUTTON_SEND_PASS; ?>" />
         </td>
      </tr>
      </table>
      
      <input type="hidden" name="option" value="<?php echo $option;?>" />
      <input type="hidden" name="task" value="sendNewPass" />
      <input type="hidden" name="<?php echo $validate; ?>" value="1" />
      </form>
      <?php
   }

   function registerForm($option, $useractivation) {
      // used for spoof hardening
      $validate = josSpoofValue();
      ?>
      <script language="javascript" type="text/javascript">
      function submitbutton_reg() {
         var form = document.mosForm;
         var r = new RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]", "i");

         // do field validation
         if (form.name.value == "") {
            alert( "<?php echo addslashes( html_entity_decode(_REGWARN_NAME) );?>" );
         } else if (form.username.value == "") {
            alert( "<?php echo addslashes( html_entity_decode(_REGWARN_UNAME) );?>" );
         } else if (r.exec(form.username.value) || form.username.value.length < 3) {
            alert( "<?php printf( addslashes( html_entity_decode(_VALID_AZ09_USER) ), addslashes( html_entity_decode(_PROMPT_UNAME) ), 2 );?>" );
         } else if (form.email.value == "") {
            alert( "<?php echo addslashes( html_entity_decode(_REGWARN_MAIL) );?>" );
         } else if (form.password.value.length < 6) {
            alert( "<?php echo addslashes( html_entity_decode(_REGWARN_PASS) );?>" );
         } else if (form.password2.value == "") {
            alert( "<?php echo addslashes( html_entity_decode(_REGWARN_VPASS1) );?>" );
         } else if ((form.password.value != "") && (form.password.value != form.password2.value)){
            alert( "<?php echo addslashes( html_entity_decode(_REGWARN_VPASS2) );?>" );
         } else if (r.exec(form.password.value)) {
            alert( "<?php printf( addslashes( html_entity_decode(_VALID_AZ09) ), addslashes( html_entity_decode(_REGISTER_PASS) ), 6 );?>" );
         } else {
            form.submit();
         }
      }
      </script>
      <form action="index.php" method="post" name="mosForm">

      <div class="componentheading">
         <?php echo _REGISTER_TITLE; ?>
      </div>

      <table cellpadding="0" cellspacing="0" border="0" width="100%" class="contentpane">
      <tr>
         <td colspan="2"><?php echo _REGISTER_REQUIRED; ?></td>
      </tr>
      <tr>
         <td width="30%">
            <?php echo _REGISTER_NAME; ?> *
         </td>
           <td>
              <input type="text" name="name" size="40" value="" class="inputbox" maxlength="50" />
           </td>
      </tr>
      <tr>
         <td>
            <?php echo _REGISTER_UNAME; ?> *
         </td>
         <td>
            <input type="text" name="username" size="40" value="" class="inputbox" maxlength="25" />
         </td>
      </tr>
      <tr>
         <td>
            <?php echo _REGISTER_EMAIL; ?> *
         </td>
         <td>
            <input type="text" name="email" size="40" value="" class="inputbox" maxlength="100" />
         </td>
      </tr>
      <tr>
         <td>
            <?php echo _REGISTER_PASS; ?> *
         </td>
           <td>
              <input class="inputbox" type="password" name="password" size="40" value="" />
           </td>
      </tr>
      <tr>
         <td>
            <?php echo _REGISTER_VPASS; ?> *
         </td>
         <td>
            <input class="inputbox" type="password" name="password2" size="40" value="" />
         </td>
      </tr>
      <tr>
           <td colspan="2">
           </td>
      </tr>
      <tr>
         <td colspan=2>
         </td>
      </tr>
      </table>

      <input type="hidden" name="id" value="0" />
      <input type="hidden" name="gid" value="0" />
      <input type="hidden" name="useractivation" value="<?php echo $useractivation;?>" />
      <input type="hidden" name="option" value="<?php echo $option; ?>" />
      <input type="hidden" name="task" value="saveRegistration" />
      <input type="button" value="<?php echo _BUTTON_SEND_REG; ?>" class="button" onclick="submitbutton_reg()" />
      <input type="hidden" name="<?php echo $validate; ?>" value="1" />
      </form>
      <?php
   }
}
?>


Grazie per l'aiuto e scusate la lungaggine! ;)

 

Host

Torna su