редактирование модуля

Тема в разделе "Программирование", создана пользователем Dashulya88, 06.01.2011.

  1. Offline

    Dashulya88 Недавно здесь

    Регистрация:
    06.01.2011
    Сообщения:
    1
    Симпатии:
    0
    Пол:
    Женский
    Друзья, помогите пожалуйста.
    Я хотела бы вставить на свой сайт закладки социальных сетей. Возможно вы и знаете mod_socialmedialinks, т.е. социальные сети. Но там нет vkontakte. Вот что я сделала:
    1. Добавила иконки (разных размеров папка icons)
    2. Изменила php

    <?php
    /*
    * @author Dallas Moore
    * Email : Dallas@viperwebistes.com
    * URL : www.viperwebsites.com
    * Description : This module displays icon links to your social media profiles.
    ***/
    /// no direct access
    defined('_JEXEC') or die('Restricted access');

    $document =& JFactory::getDocument();
    $mod = JURI::base(). 'modules/mod_socialmedialinks/';
    $document->addStyleSheet(JURI::base(). 'modules/mod_socialmedialinks/style.css');


    //Get parameters
    $moduleclass_sfx = $params->get('moduleclass_sfx','');
    $target = $params->get('target','_blank');
    $robots = $params->get('robots','0');
    //Choose the size of your icons
    $size = $params->get('size');
    //The URL to your Blogger
    $Blogger = $params->get('Blogger');
    //The URL to your Delicious
    $Delicious = $params->get('Delicious');
    //The URL to your Digg
    $Digg = $params->get('Digg');
    //The URL to your facebook
    $Facebook = $params->get('Facebook');
    //The URL to your Flickr
    $flickr = $params->get('flickr');
    //The URL to your FriendFeed
    $FriendFeed = $params->get('FriendFeed');
    //The URL to your Friendster
    $Friendster = $params->get('Friendster');
    //The URL to your Furl
    $furl = $params->get('furl');
    //The URL to your Google
    $Google = $params->get('Google');
    //The URL to your last.fm
    $lastfm = $params->get('lastfm');
    //The URL to your LinkedIn
    $LinkedIn = $params->get('LinkedIn');
    //The URL to your Livejournal
    $Livejournal = $params->get('Livejournal');
    //The URL to your Ma.gnolia
    $Magnolia = $params->get('Magnolia');
    //The URL to your Mixx
    $Mixx = $params->get('Mixx');
    //The URL to your MySpace
    $MySpace = $params->get('MySpace');
    //The URL to your NetVibes
    $NetVibes = $params->get('NetVibes');
    //The URL to your NewsVine
    $NewsVine = $params->get('NewsVine');
    //The URL to your Picasa Web Albums
    $Picasa = $params->get('Picasa');
    //The URL to your Pownce
    $Pownce = $params->get('Pownce');
    //The URL to your Reddit
    $Reddit = $params->get('Reddit');
    //The URL to your StumbleUpon
    $StumbleUpon = $params->get('StumbleUpon');
    //The URL to your Technorati
    $Technorati = $params->get('Technorati');
    //The URL to your Twitter
    $Twitter = $params->get('Twitter');
    //The URL to your Vimeo
    $Vimeo = $params->get('Vimeo');
    //The URL to your vkontakte
    $Vkontakte = $params->get('Vkontakte');
    //The URL to your Webshots
    $Webshots = $params->get('Webshots');
    //The URL to your Wordpress
    $Wordpress = $params->get('Wordpress');
    //The URL to your Yahoo!
    $Yahoo = $params->get('Yahoo');
    //The URL to your Yelp
    $Yelp = $params->get('Yelp');
    //The URL to your Youtube
    $Youtube = $params->get('Youtube');
    //The URL to your Feed
    $feed = $params->get('feed'); ?>

    <div class="module<?php echo $moduleclass_sfx; ?>">

    <ul id="socialmedialinks" class="<?php echo $size; ?>">

    <?php if ($Blogger != '') : ?>
    <li>
    <a href="<?php echo $Blogger; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/blogger.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Blogger" title="Follow us on Blogger" /></a>
    </li>
    <?php endif; ?>


    <?php if ($Delicious != '') : ?>
    <li>
    <a href="<?php echo $Delicious; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/delicious.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Delicious" title="Follow us on Delicious" /></a>
    </li>
    <?php endif ; ?>

    <?php if ($Digg != '') : ?>
    <li>
    <a href="<?php echo $Digg; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/digg.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Digg" title="Follow us on Digg" /></a>
    </li>
    <?php endif ; ?>

    <?php if ($Facebook != '') : ?>
    <li>
    <a href="<?php echo $Facebook; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/facebook.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Facebook" title="Follow us on Facebook" /></a>
    </li>
    <?php endif ; ?>

    <?php if ($FriendFeed != '') : ?>
    <li>
    <a href="<?php echo $FriendFeed; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/friendfeed.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on FriendFeed" title="Follow us on FriendFeed" /></a>
    </li>
    <?php endif ; ?>

    <?php if ($flickr != '') : ?>
    <li>
    <a href="<?php echo $flickr; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/flickr.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on flickr" title="Follow us on flickr" /></a>
    </li>
    <?php endif ; ?>

    <?php if ($Friendster != '') : ?>
    <li>
    <a href="<?php echo $Friendster; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/friendster.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Friendster" title="Follow us on Friendster" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($furl != '') : ?>
    <li>
    <a href="<?php echo $furl; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/furl.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on furl" title="Follow us on furl" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Google != '') : ?>
    <li>
    <a href="<?php echo $Google; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/google.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Google" title="Follow us on Google" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($lastfm != '') : ?>
    <li>
    <a href="<?php echo $lastfm; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/lastfm.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on lastfm" title="Follow us on lastfm" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($LinkedIn != '') : ?>
    <li>
    <a href="<?php echo $LinkedIn; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/linkedin.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on LinkedIn" title="Follow us on LinkedIn" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Livejournal != '') : ?>
    <li>
    <a href="<?php echo $Livejournal; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/livejournal.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Livejournal" title="Follow us on Livejournal" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Magnolia != '') : ?>
    <li>
    <a href="<?php echo $Magnolia; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/magnolia.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Magnolia" title="Follow us on Magnolia" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Mixx != '') : ?>
    <li>
    <a href="<?php echo $Mixx; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/mixx.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Mixx" title="Follow us on Mixx" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($MySpace != '') : ?>
    <li>
    <a href="<?php echo $MySpace; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/myspace.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on MySpace" title="Follow us on MySpace" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($NetVibes != '') : ?>
    <li>
    <a href="<?php echo $NetVibes; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/netvibes.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on NetVibes" title="Follow us on NetVibes" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($NewsVine != '') : ?>
    <li>
    <a href="<?php echo $NewsVine; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/newsvine.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on NewsVine" title="Follow us on NewsVine" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Picasa != '') : ?>
    <li>
    <a href="<?php echo $Picasa; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/picasa.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Picasa" title="Follow us on Picasa" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Pownce != '') : ?>
    <li>
    <a href="<?php echo $Pownce; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/pownce.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Pownce" title="Follow us on Pownce" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Reddit != '') : ?>
    <li>
    <a href="<?php echo $Reddit; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/reddit.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Reddit" title="Follow us on Reddit" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($StumbleUpon != '') : ?>
    <li>
    <a href="<?php echo $StumbleUpon; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/stumbleupon.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on StumbleUpon" title="Follow us on StumbleUpon" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Technorati != '') : ?>
    <li>
    <a href="<?php echo $Technorati; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/technorati.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Technorati" title="Follow us on Technorati" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Twitter != '') : ?>
    <li>
    <a href="<?php echo $Twitter; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/twitter.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Twitter" title="Follow us on Twitter" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Vimeo != '') : ?>
    <li>
    <a href="<?php echo $Vimeo; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/vimeo.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Vimeo" title="Follow us on Vimeo" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Vkontakte != '') : ?>
    <li>
    <a href="<?php echo $Vkontakte; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/vkontakte.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Vkontakte" title="Follow us on Vkontakte" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Webshots != '') : ?>
    <li>
    <a href="<?php echo $Webshots; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/webshots.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Webshots" title="Follow us on Webshots" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Wordpress != '') : ?>
    <li>
    <a href="<?php echo $Wordpress; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/wordpress.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Wordpress" title="Follow us on Wordpress" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Yahoo != '') : ?>
    <li>
    <a href="<?php echo $Yahoo; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/yahoo.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Yahoo" title="Follow us on Yahoo" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Yelp != '') : ?>
    <li>
    <a href="<?php echo $Yelp; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/yelp.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Yelp" title="Follow us on Yelp" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($Youtube != '') : ?>
    <li>
    <a href="<?php echo $Youtube; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/youtube.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Follow us on Youtube" title="Follow us on Youtube" /></a>
    </li>
    <?php endif ; ?>


    <?php if ($feed != '') : ?>
    <li>
    <a href="<?php echo $feed; ?>" target="<?php echo $target; ?>" <?php if ($robots == '1') : ?> rel="nofollow" <?php endif; ?>><img src="<?php echo $mod; ?>icons/<?php echo $size; ?>/feed.png" width="<?php echo $size; ?>px" height="<?php echo $size; ?>px" alt="Subscribe to our feed" title="RSS Feed" /></a>
    </li>
    <?php endif ; ?>


    </ul>

    <div class="clr"></div>
    </div>
    3. Изменила xml

    И не отражается эта иконка. Что делать? Заранее спасибо всем, кто сможет помочь.
     

    Вложения:

  2.  
  3. lev
    Offline

    lev специалист

    Регистрация:
    21.12.2007
    Сообщения:
    676
    Симпатии:
    40
    Пол:
    Мужской
    Последнее редактирование модератором: 31.03.2014

Поделиться этой страницей

Загрузка...