Keyword

How to add a button for blogger.com on K2 articles

  • yaksushi
  • yaksushi's Avatar Topic Author
  • Offline
  • Premium Member
More
15 years 1 week ago #75514 by yaksushi
Anyone know how I would go about adding a button to the K2 articles that links to blogger.com? I'd like to make it look like the rest of the digg twitter etc buttons currently on K2 by default

Please Log in or Create an account to join the conversation.

  • yaksushi
  • yaksushi's Avatar Topic Author
  • Offline
  • Premium Member
More
15 years 1 week ago #75515 by yaksushi
bump

Please Log in or Create an account to join the conversation.

  • Different Color
  • Different Color's Avatar
  • Offline
  • Premium Member
More
15 years 1 week ago #75516 by Different Color
Replied by Different Color on topic How to add a button for blogger.com on K2 articles
You would open the item file (probably called item.php?) located in the components/com_k2/templates/default folder and insert the button into it. I'm not a php coder, but I think that works because you're just adding button with a link on it. Right? I think the link can just be coded in a typical hyperlink.

I'd like to add a button that emails the site owner with a dynamic subject line that pulls the name of the article. I wonder what the code would be to insert that button. I'm sure it would be easy. Hmm...

Martha

Please Log in or Create an account to join the conversation.

More
14 years 10 months ago #75517 by Oceanwatcher
Replied by Oceanwatcher on topic How to add a button for blogger.com on K2 articles
Hi Martha,

I am not a coder either, but I have been hacking a bit on these files today. Before you get started, I would recommend that you create a new template. Just copy the default folder in

/components/com_k2/template

You can call it whatever you want.

Then open the file item.php and do the changes you want. In one way you could say that a button here is a typical hyperlink, but the URL part is a php expression. Here is a link to a thread I started to some buttons. I am sure you can use it as an inspiration to do what you need to do:

k2community.joomlaworks.gr/forum/topics/replacing-print-and-email-in

Hope it works out.

Svein

Martha Moody said:You would open the item file (probably called item.php?) located in the components/com_k2/templates/default folder and insert the button into it. I'm not a php coder, but I think that works because you're just adding button with a link on it. Right? I think the link can just be coded in a typical hyperlink.
I'd like to add a button that emails the site owner with a dynamic subject line that pulls the name of the article. I wonder what the code would be to insert that button. I'm sure it would be easy. Hmm...

Martha

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum