<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Centrare testo php]]></title><description><![CDATA[<p dir="auto">Ciao a tutti. Inanzitutto confesso la mia ignoranza in materia di php.<br />
Avrei un probema con un plugin che ho installato sul mio sito in joomla. Questo permette di prendere un codice html da inserire sul proprio blog o sito per mettere un collegamento con immagine e descrizione ai giochi pubblicati sul mio sito. Potete vederne un esempio qui:  <a href="http://www.giochigratisonline.eu/giochi-sport-e-sportivi/161-gioco-calcio-europei-2008.html" rel="nofollow ugc">http://www.giochigratisonline.eu/giochi-sport-e-sportivi/161-gioco-calcio-europei-2008.html</a> (il link in java è situato al termine dell'articolo a sinistra)<br />
Vorrei posizionare tale link in modo più visibile al centro sotto al gioco ma non so come editare il codice (in html sarebbe molto semplice)<br />
Oppure ancora meglio se possibile apporterei una modifica al plugin in modo da mostrare la casella con il codice html direttamente visibile.<br />
Qui di seguito vi riporto il codice:</p>
<pre><code class="language-php">&lt;?php

/**

 * @version        $Id: quothis.php 10094 2008-06-03  $

 * @package        QuotThis

 * @copyright    Copyright (C) 2008 - Bernard Gilly. All rights reserved.

 * @license        GNU/GPL

 * @Website     http://www.alphaplug.com

 */



// Check to ensure this file is included in Joomla!

defined( '_JEXEC' ) or die( 'Restricted access' );



jimport( 'joomla.plugin.plugin' );



class plgContentQuotethis extends JPlugin

{



    function plgContentQuotethis( &amp;$subject, $params )

    {

        parent::__construct( $subject, $params );

    }



    function onPrepareContent( &amp;$article, &amp;$params, $limitstart )

    {

        global $mainframe;

        

        $document    = &amp; JFactory::getDocument();

        $view        = JRequest::getCmd('view');

        

        if ( $view != 'article' ) return;        



        // Get plugin info

        $plugin              =&amp; JPluginHelper::getPlugin('content', 'quotethis');

        $pluginParams        = new JParameter( $plugin-&gt;params );

        $excludeSectionID    = $pluginParams-&gt;get( 'excludeSectionID',  '' );        

        $excludeCategoryID   = $pluginParams-&gt;get( 'excludeCategoryID', '' );

        $excludeID           = $pluginParams-&gt;get( 'excludeID',         '' );        

        $listexcludeSection  = @explode ( ",",  $excludeSectionID );    

        $listexcludeCategory = @explode ( ",", $excludeCategoryID );    

        $listexclude          = @explode ( ",",         $excludeID );        

        

        if ( $params-&gt;get( 'intro_only' ) || in_array ( $article-&gt;id, $listexclude ) || in_array ( $article-&gt;sectionid, $listexcludeSection ) || in_array ( $article-&gt;catid, $listexcludeCategory ) ) return;    

        

        JPlugin::loadLanguage( 'plg_quotethis', JPATH_ADMINISTRATOR );

        

        $loadMootools     = $pluginParams-&gt;def( 'loadMootools',           1 );

        $preview            = $pluginParams-&gt;def( 'preview',                1 );

        $txtcols         = $pluginParams-&gt;def( 'txtcols',               54 );

        $txtrows         = $pluginParams-&gt;def( 'txtrows',                7 );    

        $rowtitle        = $pluginParams-&gt;def( 'title',            'title' );        

        $intro           = $pluginParams-&gt;def( 'intro',                '0' );

        $limitcharintro  = $pluginParams-&gt;def( 'limitcharintro',     '150' );

        $showfirstimage  = $pluginParams-&gt;def( 'showfirstimage',       '0' );

        $widthimage         = $pluginParams-&gt;def( 'widthimage',         '120' );        

        $copyright       = $pluginParams-&gt;def( 'copyright',            '1' );

        $showdate        = $pluginParams-&gt;def( 'showdate',             '1' );    

        $width           = $pluginParams-&gt;def( 'width',                400 );

        $colorborder     = $pluginParams-&gt;def( 'colorborder',     '456B8F' );

        $backgroundcolor = $pluginParams-&gt;def( 'backgroundcolor', 'FFFFFF' );

        $fontsizetitle   = $pluginParams-&gt;def( 'fontsizetitle',       '13' );

        $colortitle      = $pluginParams-&gt;def( 'colortitle',      '003399' );

        $colortitlehover = $pluginParams-&gt;def( 'colortitlehover', 'FF9900' );

        $fontsize        = $pluginParams-&gt;def( 'fontsize',            '10' );

        $fontcolor       = $pluginParams-&gt;def( 'fontcolor',       '222222' );            

        

        //unset($document-&gt;_scripts[JURI::base(true) . '/media/system/js/mootools.js']);

        //unset($document-&gt;_scripts[JURI::base(true) . '/media/system/js/mootools-uncompressed.js']);

        //$document-&gt;addScript(JURI::base(true) . '/media/system/js/mootools.js');        

        if ( $loadMootools ) $document-&gt;addScript(JURI::base(true).'/plugins/content/quotethis/js/mootools.js');                

        

        $uri             =&amp; JURI::getInstance();

        $base            = $uri-&gt;toString( array('scheme', 'host', 'port'));        

        $thequote        = $base.JRoute::_(ContentHelperRoute::getArticleRoute($article-&gt;slug, $article-&gt;catslug, $article-&gt;sectionid));        



        $copyNow         = date('Y');

        $title           = stripslashes( $article-&gt;$rowtitle );

        $copyright       = ( $copyright ) ? "&amp;copy; " . $copyNow . " - " : "" ;

        $thedate         = ( $showdate )  ? "&lt;br /&gt;" . JHTML::_( 'date', $article-&gt;created, JText::_('DATE_FORMAT_LC')) : "" ;

        $introtext         = ( $intro )     ? "&lt;br /&gt;" . plgContentQuotethis::prepareIntroQuoteThis( $article-&gt;text, $limitcharintro, "" ) : "" ;

        $image              = "";

        

        if ( $showfirstimage ) {

            $image = plgContentQuotethis::findIMGquotethis( $article-&gt;text );

            $image = "&lt;img src=\"" . $image . "\" width=\"" . $widthimage . "\" alt=\"\" /&gt;";

            $image = "&lt;div style=\"float:left;padding:5px;\"&gt;" . $image . "&lt;/div&gt;";

        }

        

        $style4quote = "&lt;style type=\"text/css\"&gt;&lt;!--"

        .".quote {width:".$width."px; padding: 6px; border: solid 1px #".$colorborder."; font: ".$fontsize."px helvetica, verdana, sans-serif; color: #".$fontcolor."; background-color: #".$backgroundcolor."}"

        .".quote a {font: ".$fontsizetitle."px arial, serif; color: #".$colortitle."; text-decoration: underline}"

        .".quote a:hover {color: #".$colortitlehover."; }"

        ."//--&gt;&lt;/style&gt;";



        $javascript = "\n&lt;script language=\"JavaScript\" type=\"text/javascript\"&gt;\n&lt;!--\n"

            ."window.addEvent('domready', function(){\n"

            ."var mySlide = new Fx.Slide('quotethisexpand').hide();    \n"

            ."$('toggle').addEvent('click', function(e){\n"

            ."e = new Event(e);\n"

            ."mySlide.toggle();\n"

            ."e.stop();\n"

            ."});\n"

            ."}); \n//--&gt;"

            ."&lt;/script&gt;\n";

            

        if ( $preview ) $document-&gt;addCustomTag( $style4quote );

            

        $html  = $javascript;        

        $html .= "&lt;a id=\"toggle\" href=\"#\"&gt;" . JText::_('Pubblica il gioco sul tuo blog o sito') . "&lt;/a&gt;";

        $html .= "&lt;br /&gt;&lt;div id=\"quotethisexpand\"&gt;&lt;br /&gt;";

        $html .= "&lt;strong&gt;".JText::_('Se vuoi pubblicare un estratto di questo gioco sul tuo sito web o sul tuo sito è sufficiente che copi e incolli il codice html qui di seguito.')."&lt;/strong&gt;";

        $html .= "&lt;br /&gt;&lt;br /&gt;";        

        $html .= "&lt;textarea name=\"textarea\" cols=\"$txtcols\" rows=\"$txtrows\"&gt;".$style4quote.$image."&lt;div class=\"quote\"&gt;"

        ."&lt;a href=\"" . $thequote ."\" target=\"_blank\"&gt;" . $title . "&lt;/a&gt;" . $thedate . $introtext

        ."&lt;div align=\"right\" style=\"width:".$width."px\"&gt;&lt;p style=\"text-align:right;\"&gt;".$copyright."&lt;a href=\"".JURI::base()."\" target=\"_blank\"&gt;".$mainframe-&gt;getCfg('sitename')."&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/textarea&gt;";

        $html .= "&lt;br /&gt;&lt;br /&gt;";

        

        if ( $preview ) {

            $html .= JText::_('PREVIEWQUOTE');

            $html .= "&lt;br /&gt;&lt;br /&gt;";

            $html .= $style4quote;

            $html .= $image . "&lt;div class=\"quote\"&gt;\n&lt;a href=\"$thequote\" target=\"_blank\"&gt;$title&lt;/a&gt;"

            .$thedate.$introtext

            ."\n&lt;div align=\"right\" style=\"width:".$width."px\"&gt;&lt;p style=\"text-align:right;\"&gt;$copyright&lt;a href=\"".JURI::base()."\" target=\"_blank\"&gt;".$mainframe-&gt;getCfg('sitename')."&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;";

            $html .= "&lt;br /&gt;";        

        }

        $html .= "&lt;div class=\"small\" align=\"center\"&gt;";

        // This software is copyrighted: don't remove the copyright notice

        $html .= "Powered by &lt;a href=\"http://www.alphaplug.com\"&gt;QuoteThis&lt;/a&gt; &amp;copy; 2008";

        $html .= "&lt;/div&gt;";

        $html .= "&lt;/div&gt;";

            

        $article-&gt;text = $article-&gt;text . $html;



    }

    

    function prepareIntroQuoteThis( $text, $length=150, $tags='' ) {

        // strips tags won't remove the actual jscript

        $text = preg_replace( "'&lt;script[^&gt;]*&gt;.*?&lt;/script&gt;'si", "", $text );

        $text = preg_replace( '/{.+?}/', '', $text);

        // replace line breaking tags with whitespace

        $text = preg_replace( "'&lt;(br[^/&gt;]*?/|hr[^/&gt;]*?/|/(div|h[1-6]|li|p|td))&gt;'si", ' ', $text );

    

        return html_entity_decode(plgContentQuotethis::smartSubstrQuoteThis( strip_tags( $text, $tags ), $length ));

    }

    

    function smartSubstrQuoteThis($text, $length=150) {

        if ( strlen($text) &gt; $length ) {     

            $text = substr( $text, 0, $length );

            $blankpos = strrpos( $text, ' ' );    

            $text = substr( $text, 0, $blankpos );    

            $text .= "...";

        }  

        return $text;  

    }

    

    function findIMGquotethis( $contenttext ) {    

        $image = "";

        if ( preg_match_all('#src="(.*)"#Uis', $contenttext, $match ) ) {

            if ( count($match) ) {

                $image = $match[1][0];

            }

        }

        return $image;

    }    

}

?&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/topic/94388/centrare-testo-php</link><generator>RSS for Node</generator><lastBuildDate>Tue, 01 Dec 2026 07:11:41 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/94388.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 07 Feb 2009 14:20:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Centrare testo php on Sun, 08 Feb 2009 21:30:15 GMT]]></title><description><![CDATA[<p dir="auto">Nessuno sa aiutarmi?</p>
]]></description><link>https://dev.connect.gt/post/807402</link><guid isPermaLink="true">https://dev.connect.gt/post/807402</guid><dc:creator><![CDATA[bill152]]></dc:creator><pubDate>Sun, 08 Feb 2009 21:30:15 GMT</pubDate></item></channel></rss>