Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 05:17:36 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155544 Posts in 21714 Topics by 7736 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Share News items on Twitter (Possible addon News Module)  (Read 1363 times)
Bramus
Forum Team
*****
Offline Offline

Posts: 601


WWW
« on: February 10, 2011, 03:23:41 PM »

Share News Items on Twitter

This week i had some sparetime so i was thinking of some nice addition for some sites. Now a lot of websites use the "News" module. Maybe you are sharing cool items that people want to share also on like Twitter.

In fact we wanted this in some of our customers sites, so i did my best to make something for this. Only point, i havent fixed it yet in the News Module.

If people are interested i can build this into the News Module and share it here.

What does it do?
News items have a title that almost always tells you what the item is about, now you want to share it, but as you know the news module has long urls, thats where Bit.ly comes in handy. You also have an account for twitter, so you want an notice (@yourname).

Lets make a "Share on Twitter" button (could be multilangual), and then if you hit that, it sends you to: http://www.twitter.com/status.php?=.....

Then share the following:

@yourname Here comes your title of the news it... http://bit.ly/qwerty1

People now only have to hit the Share button on the twitter site and they twittert this item.

Requirements
You need to have an Bit.ly account (sign-up is free) and an API key. An twitter account is not needed as people will share it on their accounts pointing to you if you have it setup like that way.

Interested people?
If people like this i can make it into the news module and then share, if not well i will use it for private use only.

I'm not thinking about adding more features right now! Provided as told above nothing more!
Logged

BRAMUS Internet Services
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #1 on: February 10, 2011, 04:46:51 PM »

That does sound like a good idea actually. But couldn't it be made as a general Module / Snippet so it could be used on other module types as well? I am thinking for instance about Bakery and Topics as candidates which would benefit from this as well.

A possible work-flow:

1) detect module type of first section
2) decide which field to use
3) create the link behind the button and display both

OK .. quite rudimentary and I am not sure if it would work out ...

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

Bramus
Forum Team
*****
Offline Offline

Posts: 601


WWW
« Reply #2 on: February 10, 2011, 04:59:18 PM »

@kweitzel
That could be an option, but this was started as a personal project, and i dont think i will have the time for something like this (it is quite bigger and what moduls do you want to use etc etc).

I wanted to keep it small like as told as above, due time etc
Logged

BRAMUS Internet Services
Bramus
Forum Team
*****
Offline Offline

Posts: 601


WWW
« Reply #3 on: February 11, 2011, 02:11:02 PM »

Fixed it today in my site and the news module. I think the code is not that clean, but hey it works!

Check it at: http://www.bramus.nl/pages/posts/hosting-servers-overgezet-op-ipv6-14.php

In the backend at the settings of the news module you can enable or disable it (only for the whole news section), add the bit.ly api key and username and the @name for twitter (if you dont have one just leave it blank).

To Do
- fix uninstall for the 4 extra fields
- More translations (only NL + EN are added now)
Logged

BRAMUS Internet Services
PurpleEdge

Offline Offline

Posts: 232



WWW
« Reply #4 on: February 12, 2011, 01:33:20 AM »

I believe the News module is being re-written at the moment (I hope so  smiley )

Just a heads up.
Logged
snark
Guest
« Reply #5 on: February 12, 2011, 01:54:04 PM »

Could this be of any help

http://www.websitebaker2.org/forum/index.php/topic,17950.msg119739.html#msg119739
Logged
Bramus
Forum Team
*****
Offline Offline

Posts: 601


WWW
« Reply #6 on: February 12, 2011, 02:39:29 PM »

@snoork
Thanks for the headsup, i just did the coding yesterday so i finished it with only twitter (customer wanted it), so if people are interested let me know i will post the module.

@purpleedge
Yep thats what i heard, but as a customer wanted it i did the coding myself so the customer didnt have to wait for this.

And again if people want the module i can post it here.
Logged

BRAMUS Internet Services
snark
Guest
« Reply #7 on: February 12, 2011, 08:39:30 PM »

I have a adjustee version for newsposts, if you like i can send it,

Nice thing: you don't need an account on anything for this...
Logged
macsmet

Offline Offline

Posts: 234


« Reply #8 on: February 27, 2011, 04:59:01 PM »

@Bramus: ik ben er geïnteresseerd in jouw aanpassing. Kun je die posten?
I am very interested. Can you please post it?

greetings,

MacSmet
Logged
yishay

Offline Offline

Posts: 31



« Reply #9 on: March 01, 2011, 02:28:10 PM »

Snoork, where can i download you're newsmodule adjustment?
Logged
snark
Guest
« Reply #10 on: March 01, 2011, 08:13:53 PM »

here you go ...

be careful I am not a programmer, just an enthousiastic creative designer with a view ...


since I think the newsmodule is a module that (with some common sense and creativity ) is extremely versatile I added some s***

what did i do:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

drag n drop in the admin (modify.php)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

posts: I wanted to be able to use the newsmodule as some sort of eventlisting,
I added two datefields with can be used in the postloop and the long description as [EVENTDATE] and [EVENTDATE2]
the first one returns the startingdate of the event
the second returns "t/m and the enddate" ( so t/m is automatically included which results in that t/m is not showed if there is no enddate
(I also have a version of anynews that reckognizes those fields

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

changed the order of the settingspage, all that is valuable for only the mainadmin (the code-blocks for the loops etc) is at the bottom, other stuff is at the top ( f.i. wheter comments are on or off and howmany posts per page)

added a namefield for the page so no complete wysiwyg section is needed just for a title
use [PAGENAME] in the codeblock header to display the field

this way people do not have to struggle through the codeblocks

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

made somesort of archiving option, and note,... this is a creative one!!!

you can decide wheter this newsmodule functions as a regular newspage or as an archivepage
you can fill in the sectionnumber of the newspage that will function as the 'delivering' page.

for instance, if you have a newspage (section 23) and now make a new newspage whicht you want it to function as the archive for section 23 you fill in "23"

if you filled in a section number there will be no possibillity to add newsposts in this page anymore (untill you change the settings...)
instead you will load the posts from section 23.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

with that the direct question is "what do i do with two exact ly the same pages?..
wrong! ... the sorting option will give you the option to show either the whole page, all messages younger than 4 weeks or all messages older than 4 weeks
this will give you a chance to have a newspage with only posts from today, yesterday ... up till 4 weeks ago and a page with the rest

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

I also made an option to control the order of how messages are displayed

standard it is position ASC, this will give you the posibillity to drag n drop the messages in the order you wish

other options are order by title, order by published when and order by eventdate ( I guess this makes it an eventcalender!!!)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

commentoptions are also on top of the settingspage

I expanded the emailnotification with the possibility to fill in an emailaddres, a subject and a message ( link to the post is automatically added)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

added an extra save button

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

codeblocks are only visible to the main admingroup which prevents that anyone other than a member of the main admingroup can not mess up the codeblocks.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

for now I did most of the text in dutch hardcoded in the pages, sorry about that!


« Last Edit: March 02, 2011, 09:34:29 AM by snoork » Logged
macsmet

Offline Offline

Posts: 234


« Reply #11 on: March 01, 2011, 09:09:37 PM »

@ snoork: when testing I got this error in the backend on WB 2.8.1:

Table '.........demomod_ne ws_settings' doesn't exist

greetings,

MacSmet
Logged
snark
Guest
« Reply #12 on: March 01, 2011, 10:57:32 PM »

mistake in the installfile, I think it will work now

« Last Edit: March 02, 2011, 09:24:51 AM by snoork » Logged
snark
Guest
« Reply #13 on: March 12, 2011, 03:12:52 PM »

Nobody tested the new/modified version?
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!