populist
maandag 21 februari 2011 15:03

Social button hyves in K2 component

door  Digitechs

    Handleiding voor het invoegen van een Hyves social button in het K2 component van Joomla.
    In het K2 component voor Joomla zit standaard geen Hyves button. Met deze handleiding kun je een Hyves Tip toe laten voegen door je bezoekers.

     

    Deze handleiding geldt voor de standaard k2 template, die je vindt op de volgende locatie:

    components/com_k2/templates/default/item.php

    Vanaf regel 345 vind je de volgende code:

    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    
    	  ($this->item->params->get('itemShareLinks')): ?>
    	  
    		<divdiv class="itemSocialLinksBlock">
    			<spanspan>("Social sharing"); ?></spanspan>
    			<ulul class="itemSocialLinks">
    				<lili><aa class="googlebuzz" title="Add to Google Buzz"); ?>" href="http://www.google.com/buzz/post?url=item->socialLink; ?>&message=($this->item->title); ?>" target="_blank"><spanspan>("Add to Google Buzz"); ?></spanspan></aa></lili>
    				<lili><aa class="facebook" title="Add to Facebook"); ?>" href="http://www.facebook.com/sharer.php?u=item->socialLink; ?>&t=($this->item->title); ?>" target="_blank"><spanspan>("Add to Facebook"); ?></spanspan></aa></lili>
    				<lili><aa class="delicious" title="Add to Delicious"); ?>" href="http://del.icio.us/post?url=item->socialLink; ?>&title=($this->item->title); ?>" target="_blank"><spanspan>("Add to Delicious"); ?></spanspan></aa></lili>
    				<lili><aa class="digg" title="Digg this"); ?>" href="http://digg.com/submit?url=item->socialLink; ?>&title=($this->item->title); ?>" target="_blank"><spanspan>("Digg this"); ?></spanspan></aa></lili>
    				<lili><aa class="reddit" title="Add to Reddit"); ?>" href="http://reddit.com/submit?url=item->socialLink; ?>&title=($this->item->title); ?>" target="_blank"><spanspan>("Add to Reddit"); ?></spanspan></aa></lili>
    				<lili><aa class="stumble" title="Add to StumbleUpon"); ?>" href="http://www.stumbleupon.com/submit?url=item->socialLink; ?>&title=($this->item->title); ?>" target="_blank"><spanspan>("Add to StumbleUpon"); ?></spanspan></aa></lili>
    				<lili><aa class="myspace" title="Add to MySpace"); ?>" href="http://www.myspace.com/Modules/PostTo/Pages/?l=3&u=item->socialLink; ?>&t=($this->item->title); ?>" target="_blank"><spanspan>("Add to MySpace"); ?></spanspan></aa></lili>
    				<lili><aa class="technorati" title="Add to Technorati"); ?>" href="http://www.technorati.com/faves?add=item->socialLink; ?>" target="_blank"><spanspan>("Add to Technorati"); ?></spanspan></aa></lili>
    				<lili class="clr"></lili>
    			</ulul>
    			<divdiv class="clr"></divdiv>
    		</divdiv>
    	  


    Nu plaats je de volgende regel ertussen:

    (na: "

  •  

    <lili><aa class="hyves" title="" href="http://www.hyves-share.nl/button/tip/?tipcategoryid=12&rating=5&title=item->title; ?>&body=item->socialLink; ?>" target="_blank"><spanspan></spanspan></aa></lili>

     

    En dan krijg je dus dit:

    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    
           
           
            <divdiv class="itemSocialLinksBlock">
                <spanspan></spanspan>
                <ulul class="itemSocialLinks">
                    <lili><aa class="googlebuzz" title="" href="http://www.google.com/buzz/post?url= item->socialLink; ?>&message=" target="_blank"><spanspan></spanspan></aa></lili>
                    <lili><aa class="facebook" title="" href="http://www.facebook.com/sharer.php?u= item->socialLink; ?>&t=" target="_blank"><spanspan></spanspan></aa></lili>
                    <lili><aa class="delicious" title="" href="http://del.icio.us/post?url= item->socialLink; ?>&title=" target="_blank"><spanspan></spanspan></aa></lili>
                    <lili><aa class="digg" title="" href="http://digg.com/submit?url= item->socialLink; ?>&title=" target="_blank"><spanspan></spanspan></aa></lili>
                    <lili><aa class="reddit" title="" href="http://reddit.com/submit?url= item->socialLink; ?>&title=" target="_blank"><spanspan></spanspan></aa></lili>
                    <lili><aa class="stumble" title="" href="http://www.stumbleupon.com/submit?url= item->socialLink; ?>&title=" target="_blank"><spanspan></spanspan></aa></lili>
                    <lili><aa class="myspace" title="" href="http://www.myspace.com/Modules/PostTo/Pages/?l=3&u= item->socialLink; ?>&t=" target="_blank"><spanspan></spanspan></aa></lili>
                    <lili><aa class="technorati" title="" href="http://www.technorati.com/faves?add= item->socialLink; ?>" target="_blank"><spanspan></spanspan></aa></lili>
                    <lili><aa class="hyves" title="" href="http://www.hyves-share.nl/button/tip/?tipcategoryid=12&rating=5&title=item->title; ?>&body=item->socialLink; ?>" target="_blank"><spanspan></spanspan></aa></lili>
                    <lili class="clr"></lili>
                </ulul>
                <divdiv class="clr"></divdiv>
            </divdiv>
           
     

     

    Je kunt nu eventueel ook de social buttons verwijderen die je niet gebruikt door de complete regel van  
  • to  
  • weg te halen. Of je kunt de items anders rangschikken.

    Om het verhaal helemaal af te maken voeg je in je language files je net aangemaakte button toe met een goede vertaling.
    Dit doe je op de volgende wijze:

    Nu open je ' nl-NL.com_k2.ini ' die staat in '/language/nl-NL/'
    (tenzij je geen nederlandse taal hebt geïnstalleerd dan moet je 'nl-NL' vervangen door 'en-GB')

    In deze file zoek je de volgende regel op:

     

    ADD TO TECHNORATI=Toevoegen aan Technorati

     

     

    en hieronder plaats je de volgende regel:

     

    ADD TO HYVES=Tip plaatsen op Hyves

     

    Nu heb je dus in je K2 component een Hyves button erbij.

    Mocht je nu echt lui zijn, download dan de aangepaste items onderaan het artikel en upload de inhoud van de map naar de root van je Joomla installatie, dan ben je ook klaar.

    Ik hoop dat iemand hier iets aan heeft. Succes.

     

    Laatst gewijzigd op: maandag 28 februari 2011 16:13

    Plaats reactie


    Beveiligingscode
    Vernieuwen