- Posts: 175
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Replacing Print and E-mail in Tools with icons and adding a couple of the social buttons
Replacing Print and E-mail in Tools with icons and adding a couple of the social buttons
- Oceanwatcher
-
Topic Author
- Offline
- Elite Member
Anyone to the rescue?
Please Log in or Create an account to join the conversation.
- Johann Scheving
-
- Offline
- New Member
- Posts: 12
Please Log in or Create an account to join the conversation.
- Erebrum
-
- Offline
- Junior Member
- Posts: 30
about replacing print and email links with icons just recently did something with featured notice (replaced it with image). I suppose that you are talking about print and email links beside font resizer in item view.
so what i did:
1. create custom template and assign it to your category (custom template placing issue here
2. go in your custom template folder and open item.php, on line 104 there is block starting about print button
3. here is changed code:
ehh ok i pasted code but as in this forum there is no code block or something it messed all up i will try to attach image or file...
ok attached image click on it for bigger version
That would be it - short version. And instead of print text link you have a button :) Same process should be applied on email or any other change if i am not mistaking.
Please Log in or Create an account to join the conversation.
- Oceanwatcher
-
Topic Author
- Offline
- Elite Member
- Posts: 175
One thing worth mentioning is that the way you have set it up here, the icons needs to be in the images folder of the template you are using for Joomla, not the images folder of the K2 component. But as long as you know, it is all good!
My next project is to move a few of the Social buttons up next to the print and e-mail button. But I will make a separate topic for that so it is easier to find later.
Again - thanks a lot for your tip. VERY useful!
Regards,
Svein
Erebrum said:Hi, about replacing print and email links with icons just recently did something with featured notice (replaced it with image). I suppose that you are talking about print and email links beside font resizer in item view.
so what i did:
1. create custom template and assign it to your category (custom template placing issue here
2. go in your custom template folder and open item.php, on line 104 there is block starting about print button
3. here is changed code:
ehh ok i pasted code but as in this forum there is no code block or something it messed all up i will try to attach image or file...
ok attached image click on it for bigger version
That would be it - short version. And instead of print text link you have a button :) Same process should be applied on email or any other change if i am not mistaking.
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
Svein Wisnaes said:This works absolutely perfect! Thanks! Sorry that I was not able to get around to test it before now, but now I have it done And it looks great :-)
One thing worth mentioning is that the way you have set it up here, the icons needs to be in the images folder of the template you are using for Joomla, not the images folder of the K2 component. But as long as you know, it is all good!
My next project is to move a few of the Social buttons up next to the print and e-mail button. But I will make a separate topic for that so it is easier to find later.
Again - thanks a lot for your tip. VERY useful!
Regards,
Svein
Erebrum said:Hi, about replacing print and email links with icons just recently did something with featured notice (replaced it with image). I suppose that you are talking about print and email links beside font resizer in item view. so what i did:
1. create custom template and assign it to your category (custom template placing issue here
2. go in your custom template folder and open item.php, on line 104 there is block starting about print button
3. here is changed code:
ehh ok i pasted code but as in this forum there is no code block or something it messed all up i will try to attach image or file...
ok attached image click on it for bigger version
That would be it - short version. And instead of print text link you have a button :) Same process should be applied on email or any other change if i am not mistaking.
Please Log in or Create an account to join the conversation.
- Oceanwatcher
-
Topic Author
- Offline
- Elite Member
- Posts: 175
After I wrote this, I tried to figure out how to move a couple of the social media icons up beside the print and e-mail icons. The solution I came up with was very close to what you have done here and I liked your solution very much. I think I will use that one instead of the one suggested by Erebrum as it involves less code and seems a bit "cleaner" to me.
I will post a message in this forum about my solution for the social media icons. Things are working, but I have two problems you might be able to give me a tip about.
Thank you very much for your tip!
Simon Wells said:I did a similar trick on my site, here is a link to the guide I wrote.
Please Log in or Create an account to join the conversation.
- Oceanwatcher
-
Topic Author
- Offline
- Elite Member
- Posts: 175
I copied the href statements from the row of social buttons at the bottom of the article and added the image source. This is basically just a picture with a link built in an absolute standard way. But the link URL has been replaced by a php expression.
I have two problems here. I could not find the correct Twitter code for the button. Actually, I would not mind having a button that show the number of Tweets for this article and allows the user to Tweet is with a click.
The other problem I have is that I do not get any tooltip (alt-tag) when hovering the mouse over the icons. Any idea why? I get it on several other things on the same page, just not the new icons.
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
I also need to re-ook at my code as the Alt text is not works, although it appears to be present, so I will update shortly.
Svein Wisnaes said:Actually - the title of the thread covers everything, so it is ok to add things here :-)
I copied the href statements from the row of social buttons at the bottom of the article and added the image source. This is basically just a picture with a link built in an absolute standard way. But the link URL has been replaced by a php expression.
I have two problems here. I could not find the correct Twitter code for the button. Actually, I would not mind having a button that show the number of Tweets for this article and allows the user to Tweet is with a click.
The other problem I have is that I do not get any tooltip (alt-tag) when hovering the mouse over the icons. Any idea why? I get it on several other things on the same page, just not the new icons.
Please Log in or Create an account to join the conversation.
- Oceanwatcher
-
Topic Author
- Offline
- Elite Member
- Posts: 175
Here is what the bar under the main picture in my articles look like now. It is still a bit rough and needs adjustments, but you get the idea:
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
I have redone the code and cleaned it a bit more too, plus added "title" to display tooltip on hover.
Svein Wisnaes said:I also noticed in your article that you had two span statements with no closing. Maybe they are closed further down, but I thought they should be inside the if-then loop?
Here is what the bar under the main picture in my articles look like now. It is still a bit rough and needs adjustments, but you get the idea:
Please Log in or Create an account to join the conversation.
- Oceanwatcher
-
Topic Author
- Offline
- Elite Member
- Posts: 175
The print icon:
The e-mail icon:
And the two social media icons:
Only thing left now is Twitter.
For some reason, I have to enter my Twittername in the settings to be able to show the built-in Twitter link. But this should not be necessary. I am not the one that will be clicking this link all the time :-)
So I need something more general. The cool thing would be if it could pick up how many times the article had been tweeted before, but it is not really necessary.
Ideas?
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
tweetmeme.com
Svein Wisnaes said:Thank you for that tip. I have cleaned up a bit and got the tooltip to work on all icons now.
The print icon:
The e-mail icon:
And the two social media icons:
Only thing left now is Twitter.
For some reason, I have to enter my Twittername in the settings to be able to show the built-in Twitter link. But this should not be necessary. I am not the one that will be clicking this link all the time :-)
So I need something more general. The cool thing would be if it could pick up how many times the article had been tweeted before, but it is not really necessary.
Ideas?
Please Log in or Create an account to join the conversation.
- Oceanwatcher
-
Topic Author
- Offline
- Elite Member
- Posts: 175
Svein
Simon Wells said:How about a TweeMeMe hack? tweetmeme.com
Please Log in or Create an account to join the conversation.
- Oceanwatcher
-
Topic Author
- Offline
- Elite Member
- Posts: 175
By clicking on the button you get this message:
Reading @twittername Main-article-title tinyurl.com/xyxyxyx
I think this is absolutely acceptable, so for now I think I will let this part stay as it is. Only thing I might do is tweak the icons a little :-)
Only thing you have to remember is to add the twittername you want to use as the main twitter reference in the K2 settings. And don't include the @.
Please Log in or Create an account to join the conversation.
- Oceanwatcher
-
Topic Author
- Offline
- Elite Member
- Posts: 175
Did you look at my final suggestion? I thought I had the alt-tags in there, and using Firebug on a project page, it looks like it is in place. Could you test it, please?
Regards,
Svein
Dan Englander (highrockmedia) said:Why not just add CSS background images and then just offset the text with a negative margin?
So for a print icon, use something like this (using K2's CSS classes):
.itemToolbar ul li a.itemPrintLink
{
background: url(/images/print-icon.gif) no-repeat center;
text-indent: -9999px;
}
Also with your code, your images don't not have alt tags.
Please Log in or Create an account to join the conversation.
- Peter Jørgensen
-
- Offline
- New Member
- Posts: 10
Hi
Is it possible that you can show me the code you use to replace featured notice with an image.
It will help me at lot.
Many thk.
Peter
Please Log in or Create an account to join the conversation.
- Erebrum
-
- Offline
- Junior Member
- Posts: 30
Ok code to replace featured notice with image:
file is category_item.php in template files and this changes featured notice with image you choose in article category listing - if you follow featured article, text notice will be there - template for article display needs to be changed for this (possibly same/similar code)
hope this helps
Peter Jørgensen said:Erebrum said:Hi, about replacing print and email links with icons just recently did something with featured notice (replaced it with image). Hi
Is it possible that you can show me the code you use to replace featured notice with an image.
It will help me at lot.
Many thk.
Peter
Please Log in or Create an account to join the conversation.
- Peter Jørgensen
-
- Offline
- New Member
- Posts: 10
just what i need.
I have fixed the article featured icon.
Have a god day :)
Peter
Erebrum said:Hi i just noticed your Q (did not been around for some time) Ok code to replace featured notice with image:
file is category_item.php in template files and this changes featured notice with image you choose in article category listing - if you follow featured article, text notice will be there - template for article display needs to be changed for this (possibly same/similar code)
hope this helps
Peter Jørgensen said:Erebrum said:Hi, about replacing print and email links with icons just recently did something with featured notice (replaced it with image). Hi Is it possible that you can show me the code you use to replace featured notice with an image.
It will help me at lot.
Many thk.
Peter
Please Log in or Create an account to join the conversation.
- Carlos Salas
-
- Offline
- Junior Member
- Posts: 22
Please Log in or Create an account to join the conversation.
- Peter Jørgensen
-
- Offline
- New Member
- Posts: 10
Carlos Salas said:You people need to learn CSS (= Not everything has to be a hack
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Replacing Print and E-mail in Tools with icons and adding a couple of the social buttons