Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>you have to edit the blocksocial.php</p> <p>this code i have added the google link</p> <p>find a "getContent" method on your blocksocial.php in your module folder</p> <p>and change it to</p> <pre><code>public function getContent() { // If we try to update the settings $output = ''; if (isset($_POST['submitModule'])) { Configuration::updateValue('blocksocial_facebook', (($_POST['facebook_url'] != '') ? $_POST['facebook_url']: '')); Configuration::updateValue('blocksocial_twitter', (($_POST['twitter_url'] != '') ? $_POST['twitter_url']: '')); Configuration::updateValue('blocksocial_rss', (($_POST['rss_url'] != '') ? $_POST['rss_url']: '')); Configuration::updateValue('blocksocial_google', (($_POST['google_url'] != '') ? $_POST['google_url']: '')); $this-&gt;_clearCache('blocksocial.tpl'); $output = '&lt;div class="conf confirm"&gt;'.$this-&gt;l('Configuration updated').'&lt;/div&gt;'; } return ' &lt;h2&gt;'.$this-&gt;displayName.'&lt;/h2&gt; '.$output.' &lt;form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post"&gt; &lt;fieldset class="width2"&gt; &lt;label for="facebook_url"&gt;'.$this-&gt;l('Facebook URL: ').'&lt;/label&gt; &lt;input type="text" id="facebook_url" name="facebook_url" value="'.Tools::safeOutput((Configuration::get('blocksocial_facebook') != "") ? Configuration::get('blocksocial_facebook') : "").'" /&gt; &lt;div class="clear"&gt;&amp;nbsp;&lt;/div&gt; &lt;label for="twitter_url"&gt;'.$this-&gt;l('Twitter URL: ').'&lt;/label&gt; &lt;input type="text" id="twitter_url" name="twitter_url" value="'.Tools::safeOutput((Configuration::get('blocksocial_twitter') != "") ? Configuration::get('blocksocial_twitter') : "").'" /&gt; &lt;div class="clear"&gt;&amp;nbsp;&lt;/div&gt; &lt;label for="rss_url"&gt;'.$this-&gt;l('RSS URL: ').'&lt;/label&gt; &lt;input type="text" id="rss_url" name="rss_url" value="'.Tools::safeOutput((Configuration::get('blocksocial_rss') != "") ? Configuration::get('blocksocial_rss') : "").'" /&gt; &lt;div class="clear"&gt;&amp;nbsp;&lt;/div&gt; &lt;label for="rss_url"&gt;'.$this-&gt;l('Goolge Plug: ').'&lt;/label&gt; &lt;input type="text" id="google_url" name="google_url" value="'.Tools::safeOutput((Configuration::get('blocksocial_google') != "") ? Configuration::get('blocksocial_google') : "").'" /&gt; &lt;div class="clear"&gt;&amp;nbsp;&lt;/div&gt; &lt;br /&gt;&lt;center&gt;&lt;input type="submit" name="submitModule" value="'.$this-&gt;l('Update settings').'" class="button" /&gt;&lt;/center&gt; &lt;/fieldset&gt; &lt;/form&gt;'; } </code></pre> <p>and after that find "hookDisplayFooter" method</p> <p>and change it to</p> <pre><code>public function hookDisplayFooter() { if (!$this-&gt;isCached('blocksocial.tpl', $this-&gt;getCacheId())) $this-&gt;smarty-&gt;assign(array( 'facebook_url' =&gt; Configuration::get('blocksocial_facebook'), 'twitter_url' =&gt; Configuration::get('blocksocial_twitter'), 'rss_url' =&gt; Configuration::get('blocksocial_rss'), 'google_url' =&gt; Configuration::get('blocksocial_google') )); return $this-&gt;display(__FILE__, 'blocksocial.tpl', $this-&gt;getCacheId()); } </code></pre> <p>last you need to change the template file. if your template file override by your theme means find a "module" folder from the theme foler and find "blocksocial" folder and edit the blocksocial.tpl</p> <p>if it is not override by your theme file means you can edit the blocksocial.tpl in you module folder </p> <p>the changes should be</p> <pre><code>&lt;div id="social_block"&gt; &lt;p class="title_block"&gt;{l s='Follow us' mod='blocksocial'}&lt;/p&gt; &lt;ul&gt; {if $facebook_url != ''}&lt;li class="facebook"&gt;&lt;a href="{$facebook_url|escape:html:'UTF-8'}"&gt;{l s='Facebook' mod='blocksocial'}&lt;/a&gt;&lt;/li&gt;{/if} {if $twitter_url != ''}&lt;li class="twitter"&gt;&lt;a href="{$twitter_url|escape:html:'UTF-8'}"&gt;{l s='Twitter' mod='blocksocial'}&lt;/a&gt;&lt;/li&gt;{/if} {if $rss_url != ''}&lt;li class="rss"&gt;&lt;a href="{$rss_url|escape:html:'UTF-8'}"&gt;{l s='RSS' mod='blocksocial'}&lt;/a&gt;&lt;/li&gt;{/if} {if $google_url != ''}&lt;li class="google"&gt;&lt;a href="{$google_url|escape:html:'UTF-8'}"&gt;{l s='Google' mod='blocksocial'}&lt;/a&gt;&lt;/li&gt;{/if} &lt;/ul&gt; &lt;/div&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload