Nucleus Support Forum Index

Find on the forum:
any terms  all terms  Advanced Search

RSS 2.0
Browse posts: Unanswered | Mark all read

« »
Loading Nucleus FAQ ticker...
Post new topic Reply to topic
Author Message
Steve M
Nucleus Newbie


Joined: 16 May 2011
Posts: 16
Location: US

Post Posted: Mon May 16, 2011 3:30 am   Post subject: Add "Tweet" button below Items
Reply with quote

This adds a "Tweet" button to your Item page below the entry, right before the comment area.

More information: Tweet Button

Open Items Page template->Find <%item(dreamy/item)%>->Add above:
Code:
<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="username">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>


You can change the following tags:

  1. data-count="veritcal" (You can use vertical, horizontal, or none)
  2. data-via="username" (Put your username for Twitter here if you don't want this just remove from the <a href> line


You can use the following tags just add to the <a href> tag:

  1. data-text="Example" (This adds text to be used instead of the title of the page)
  2. data-lang="en" (Can use any language abbreviation)


Example of it working: Example

Enjoy, if I knew how to do plugins I would just turn this into a plugin but I'm still learning the PHP side of NucluesCMS.

Back to top

View user's profile Send private message
TCC
Nucleus Addict


Joined: 22 Jun 2010
Posts: 70
Location: USA

Post Posted: Mon May 16, 2011 5:58 pm   Post subject:
Reply with quote

This is sweet - thank you for posting it.

Quote:
Enjoy, if I knew how to do plugins I would just turn this into a plugin but I'm still learning the PHP side of NucluesCMS.


As a thought, writing a plugin can be easier than you might think. It can also be a route to learning Nucleus. With Nucleus being a volunteer effort, it is understandable if this doesn't fit your plans but -

Information scattered through various NucleusCMS-related sites includes Hands on plugin writing: Notify by mail and Nucleus Plugin Development Shortcuts.

One forum section is devoted to Plugin Development & Questions. If you run into any glitches, you can look for help there.

As well, downloading and studying a couple plugins could provide further insights.

Back to top

View user's profile Send private message Visit poster's website
Steve M
Nucleus Newbie


Joined: 16 May 2011
Posts: 16
Location: US

Post Posted: Mon May 16, 2011 10:14 pm   Post subject:
Reply with quote

Your welcome.

Thanks for the info, I may try to turn it into a plugin.

Back to top

View user's profile Send private message
WillyP
Nucleus Guru
Nucleus Guru


Joined: 30 Aug 2009
Posts: 770
Location: Pembroke, NH

Post Posted: Mon May 16, 2011 11:00 pm   Post subject:
Reply with quote

Does this really need to be a plugin? Not saying it shouldn't be, but what would you do with a plugin, it is just a link.
_________________
My Skins | Suncook Carpentry

Back to top

View user's profile Send private message Visit poster's website
ftruscot
Nucleus Guru
Nucleus Guru


Joined: 22 Feb 2006
Posts: 7449
Location: Massachusetts

Post Posted: Mon May 16, 2011 11:10 pm   Post subject:
Reply with quote

It seems, since you add it to the skin, that it's easy enough to just copy and paste the code once and be done. A plugin would be overkill.

However, I still encourage you to look into the plugin process. We can always use more plugin writers.

_________________
Is your question not solved yet?
Search our FAQ,
read the Documentation, or
browse the list of available plugins.

Check out my plugins

Back to top

View user's profile Send private message Visit poster's website
Post new topic Reply to topic
Display posts from previous:   

Page 1 of 1

All times are GMT + 1 Hour

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group