Welcome Guest, Not a member yet? Register   Sign In
Extend with Share Helper
#1

[eluser]Ludovic-r[/eluser]
Hi!

I have 2 question that I can't resolve myself :

First, I try to create a custom CMS with codeigniter with a social part and I use the Share Helper (http://codeigniter.com/wiki/Share-helper/). In the view I have this :

Code:
<?
// in Controller
$url    = 'http://www.myurl.com';
$text    = 'My text';
$image    = 'http://www.myurl.com/myimage.jpg';
?>

<!-- this is View -->
<p>
    <a >$url, 'text'=>$text))?&gt;">Share to Twitter</a>
    <a >$url, 'text'=>$text))?&gt;">Share to Facebook</a>
    <a >$url, 'image'=>$image, 'text'=>$text))?&gt;">Share to Google Buzz</a>
</p>
<p>
    &lt;?=share_button('twitter',    array('url'=>$url, 'text'=>$text, 'type'=>'iframe'))?&gt;
    &lt;?=share_button('facebook',    array('url'=>$url, 'text'=>$text))?&gt;
    &lt;?=share_button('buzz',        array('url'=>$url, 'image'=>$image, 'text'=>$text))?&gt;
</p>

The problem is that I can't put a variable in the $url parameter (like $url = base_url().$post_titleWink because when I click to share on Twitter it said that the url in $url variable is incorrect. Do you have some ideas to share about this ?

The second thing is that I would like to add some social services to this Helper (like stumbleupon, tumblr, digg) Do you have any ideas or issues to do that?

Your help will be very appreciated!




Theme © iAndrew 2016 - Forum software by © MyBB