Recent Topics

1 Nov 16, 2007 16:09    

it would be more useful if we can make a plugin for that , but im not capable of doing it..

instead i thought i could make a hack to use in items.main.php... so

in example to add in facebook it would be enough to add a code

echo "<a href=\"http://www.facebook.com/share.php?u=$Item->permanent_link(); 
\"><img src=\"http://www.facebook.com/favicon.ico\" width=\"16\" height=\"16\" />";
	?>

but it's not getting the permalink of the post.. what should i use instead of $Item->permanent_link(); right after share.php?u..

take a look at

www.tilqi.com

2 Nov 16, 2007 17:50

currently we have got a code

 <?php

echo('<a href="http://www.facebook.com/share.php?u='.$Item->permanent_url().'"><img src="http://www.facebook.com/favicon.ico"></a>');
?> 

thanks very much to afwas for all help..

now what is expected ;

1.display facebook icon
2.icon linking to shareurl+post permalink

take a look at www.tilqi.com

what we have is
1.displaying facebook icon
2.icon linking to shareurl only
3. displaying permalink...

what we need is;

merge permalink right after share url.. what to do ? any ideas?

to demonstrate take a look at the screenshot
http://img100.imageshack.us/my.php?image=vvvhq7.jpg

3 Nov 16, 2007 19:04

echo '<a href="http://www.facebook.com/share.php?u='.$Item->get_permanent_url().'"><img src="http://www.facebook.com/favicon.ico" alt="facebook image" /></a>';

¥

4 Nov 17, 2007 01:21

yea that have definitely worked.. i will use it for other common social sites and paste the code in case anybody needs..

thanking you again.. also thanks to afwas.. :)

5 Nov 17, 2007 07:13

posting these into items.main.php will gather favicons from those sites and add the post to share ..

a simple hack for those who cannot find a suitable working plugin:

echo '<a href="http://www.facebook.com/share.php?u='.$Item->get_permanent_url().'"><img src="http://www.facebook.com/favicon.ico" style="padding-right:3px" alt="facebook" width="16" height="16" /></a>'; 

echo '<a href="http://digg.com/submit?phase=2&amp;url='.$Item->get_permanent_url().'"><img src="http://digg.com/favicon.ico" style="padding-right:3px" alt="digg" width="16"height="16" /></a>';

echo '<a href="http://del.icio.us/post?url='.$Item->get_permanent_url().'"><img src="http://del.icio.us/favicon.ico" style="padding-right:3px" alt="del.icio.us" width=16 height=16 /></a>';

echo '<a href="http://www.stumbleupon.com/submit?url='.$Item->get_permanent_url().'"><img src="http://www.stumbleupon.com/favicon.ico" style="padding-right:3px" alt="stumbleupon" width=16 height=16 /></a>' 

you can decrease the number of items by changing favicons and shareurl

you can see in action at : www.tilqi.com

thanks to ¥åßßå and afwas for helping..

6 Nov 18, 2007 22:48

Yay, you added the alt tags and / closed the images :D

Now you need to add quotes around width and height ;) width="16" height="16"

¥

7 Dec 01, 2007 08:33

Thanks to you both, this looks good. Tilicom, Im sorry, I dont understand where this is supposed to go...items.main.php? Can you tell me where to find this please?

Just quickly, which version does this work with, perhaps I dont have this file? Im using 1.9.3.

Appreciated, S

8 Dec 01, 2007 13:26

In 1.9.3 it's ../blogs/skins/YOURSKIN/_main.php

9 Dec 01, 2007 13:55

Thanks, thats what I fugured but Ive played with mine so much that I have no idea where to put it...and guessing it probably wont work as is. This is the section of code in my _main.php which it will need to slot in somewhere. Ideally just before the msgform_link. Can you help?

<h2 class="bTitle"><?php $Item->title(); ?></h2>
		<div class="bText">
			<?php $Item->content(); ?>
			<?php link_pages() ?>
		</div>
		<div class="bSmallHead">

		</div>
		<div class="bSmallPrint">
			<?php $Item->permanent_link( '#', '#', 'permalink_right' ); ?>
				
			<?php $Item->msgform_link( $Blog->get('msgformurl') )  ?>
			<?php $Item->author( '<strong>', ' &middot; </strong>' ); ?>
			<?php $Item->categories() ?>
			<?php $Item->feedback_link( 'comments', ' &middot; ' ) ?>	
			<?php $Item->edit_link( ' &middot; ' ) // Link to backoffice for editing ?>
			<?php $Item->trackback_rdf() // trackback autodiscovery information ?>
					
		</div>

10 Dec 01, 2007 14:02

Since you are in html and not in php, put this in the blank line:

<div>
<a href="http://www.facebook.com/share.php?u=<?php $Item->get_permanent_url() ?>"><img src="http://www.facebook.com/favicon.ico" style="padding-right:3px" alt="facebook" width="16" height="16" /></a>

<a href="http://digg.com/submit?phase=2&amp;url=<?php $Item->get_permanent_url() ?>"><img src="http://digg.com/favicon.ico" style="padding-right:3px" alt="digg" width="16" height="16" /></a>

<a href="http://del.icio.us/post?url=<?php $Item->get_permanent_url() ?>"><img src="http://del.icio.us/favicon.ico" style="padding-right:3px" alt="del.icio.us" width=16 height=16 /></a>

<a href="http://www.stumbleupon.com/submit?url=<?php $Item->get_permanent_url() ?>"><img src="http://www.stumbleupon.com/favicon.ico" style="padding-right:3px" alt="stumbleupon" width=16 height=16 /></a>
</div>

I didn't test this, so report back (with a link if possible) if it doesn't turn out the way you expected.

Good luck

11 Dec 01, 2007 14:21

Thanks again. Not quite right (Mature Audience Warning) *link removed*. The images are sitting above the msgform, author, comments etc rather than in front of them and when you click them the link isnt working...ie, not picking up the permalink for the post.

(Im only wanting the delicious and stumble)

I was playing with http://forums.b2evolution.net/viewtopic.php?t=11444&postdays=0&postorder=asc&highlight=clickable+links+comments&&start=0 earlier. The icons did sit where I wanted them too in front of the msgform, but the link didnt work properly there either so I figured it must be out of date with my version??

Nb. What do you mean Im in html not php? Dont answer if its complicated :)

12 Dec 01, 2007 14:34

1) No <div> </div> in order to get the images before the line and not above.
2) try this:

<?php
echo '<a href="http://del.icio.us/post?url='.$Item->get_permanent_url().'">
<img src="http://del.icio.us/favicon.ico" style="padding-right: 3px" 
alt="del.icio.us" width="16" height="16" /></a>';

echo '<a href="http://www.stumbleupon.com/submit?url='.$Item->get_permanent_url().'">
<img src="http://www.stumbleupon.com/favicon.ico" style="padding-right: 3px" 
alt="stumbleupon" width="16" height="16" /></a>'
?>

13 Dec 01, 2007 14:41

Now we're in correct position but the links arent working.

Behaving similiar (if I can remember rightly) to the other method I tried. Im wondering if the problem isnt else where?

14 Dec 01, 2007 14:49

I'd say the URL's come out correctly, but I can't test them in Stumble Upon.

15 Dec 01, 2007 15:05

Are these actually correct? Neither of them are picking up the page title. Delicious wont save the URL, Stumble does but it links to the post without comments showing. This is the URL which includes comments.

http://www.........co.nz/blog/sally.php?title=belle_de_jour_story_of_a_uk_call_girl&more=1&c=1&tb=1&pb=1#comments

16 Dec 01, 2007 15:10

I don't know where you get the #comment (at the end) from. The url this code generates is identical to the Permalink of the post and that is how it should be.

17 Dec 01, 2007 15:13

Ill get it figured out. Thanks for your help.

18 Dec 01, 2007 15:50

The #comments seems to happen when you click through to the comments from the All Blog:

http://www...........co.nz/blog/sally.php?title=belle_de_jour_story_of_a_uk_call_girl&more=1&c=1&tb=1&pb=1#comments

Delicious still isnt saving it at all. When Stumble link is clicked it converts the proper URL:

http://www................co.nz/blog/sally.php?title=belle_de_jour_story_of_a_uk_call_girl&more=1&c=1&tb=1&pb=1

To this...which is what it then saves. This URL shows the post without comments:

http://www..........co.nz/blog/sally.php?title=belle_de_jour_story_of_a_uk_call_girl

Ive taken them off and going to bed. Its 4am and passed time. If anyone has magical cures, perhaps had a similiar problem, Id would like to get this working. Thanks.

19 Dec 07, 2007 14:01

Did someone work out the issue with this one?

I've tried all the codes suggested, but delicious either doesn't pick up the post URL, or it cuts the URL in half.

I'd really love this one to work

20 Dec 07, 2007 14:08

I didnt go back to it but have just upgraded to 2.x and was about to try again, though need to check whether it should work in this Version. Which one are you using?

21 Dec 08, 2007 05:54

I'm using version 1.10.2

22 Dec 18, 2007 10:44

Ok, ive just waded through adding this to my new 2.2 blog:

  
           <?php 			
            echo '<a href="http://digg.com/submit?phase=2&amp;url='.$Item->get_permanent_url().'"><img src="http://www.mysite.com/digg.gif" style="padding-right:3px" alt="DIGG this Post" width="38" height="16" /></a>'; 
			 
             echo '<a href="http://technorati.com/faves?add='.$Item->get_permanent_url().'"><img src="http://www.mysite.com/technorati.png" style="padding-right:3px" alt="Fave this at Technorati" width="16" height="16" /></a>'; 

             echo '<a href="http://del.icio.us/post?url='.$Item->get_permanent_url().'"><img src="http://www.mysite.com/delicious.png" style="padding-right:3px" alt="Add to del.icio.us" width="16" height="16" /></a>'; 

             echo '<a href="http://www.stumbleupon.com/submit?url='.$Item->get_permanent_url().'"><img src="http://www.mysite.com/stumbleupon.png" style="padding-right:3px" alt="Stumble it!" width="16" height="16" /></a>' 
            ?>

Im nervous about testing it properly (I set up Digg on my old blog, tested it, then they banned my URL and closed my account accusing me of spamming. I clicked it maybe 6 times. They DONT reconsider). These do seem to be working better this time though am still awaiting errors. Will let you know if any crop up. Ive conceded that the URL they save which doesnt include the full post with comments is fine.

These codes arent automatically generating titles so anyone submitting your post to one of these has to write one in them self. If someone can suggest how we fix this it would be good. If anyone can see something wrong please let me know.


Form is loading...