Hi! Could it be possible to modify this module to make networks customizable? Making it possible to add a field other social networks, like "NetLog" or other national ones, perhaps being able to upload custom icons, choose whether to show text description or not (social network icon only) and to rearrange icons as a grid instead of a roster. Thanks! :)

Comments

q0rban’s picture

Hi, I've thought about providing the ability to add custom networks before, I've just been hesitant thinking that it would be hard to create a uniform look for them. I'm open to the idea though. Maybe a default generic icon?

The styling of the icons is created solely via CSS, so if you wanted a grid layout with no description, you could do thusly:

a.follow-link {
  width: 24px;
  height: 25px;
  text-indent: -9999px;
  float: left;
  margin: 0 8px 8px 0;
}
cesareaugusto’s picture

Hi, I've thought about providing the ability to add custom networks before, I've just been hesitant thinking that it would be hard to create a uniform look for them. I'm open to the idea though. Maybe a default generic icon?

Thanks for your swift response! About "uniformity". I think the module itself shouldn't care of having a uniform look'n'feel. Perhaps just have few "default" uniform icons for the most popular networks the admin can easily change. Uniformity of graphics should be a matter of the web designer. The module itself should provide a good architecture to make it easy to set up "Follow us" links in a block. Perhaps having few options whether to display them as a roster or a grid, whether to show text or not, set icons dimensions to fit CSS grid properties.

I'm not that good in coding, though I may help in concept-designing, icons graphic and translating into Italian and Spanish if you need to.

heather’s picture

@cesaraugusteo - can you design a generic default "follow" graphic? a smiley face? a + sign? mm... An arrow? an eye?

heather’s picture

Status: Active » Needs review
StatusFileSize
new1.69 KB
new111.51 KB
new18.3 KB

Maybe cesaraugusteo would have some better ideas? I don't claim to be a graphic designer, but if getting "custom" links into this module is hindered by no icon, I'd like to help out.

I played around with the arrow idea.

This is the best of the lot.

I looked closely at the two types of icons in the follow set. They both seem to have...
- 1 px border
- small bezel
- slightly glowing background
- s surve "reflection" over the top (in some it's more blurred, but at these sizes it works OK not blurred)

There's a good tutorial to follow which gets a similar look:
http://www.blog.spoongraphics.co.uk/tutorials/create-a-vector-rss-icon-w...

I've attached the original .ai file in case you have that package. This source .ai file (in the .zip) has a layer where you can pop in a drawing for a custom icon. And you can change the gradients if you need other colours.

~h

scott m. sanders’s picture

These are all exactly the features I want too, so I subscribed.

Like just, for example, the Tango email icon for newsletter subscription would be great.

q0rban’s picture

Assigned: Unassigned » q0rban
Status: Needs review » Needs work

Sorry this is taking me so long to get to. I know you're probably tired of hearing the "I've got a lot going on right now" schpiel from module maintainers, so I'll spare you. But just so you know, I am interested in a solution for this and will try to carve out time for it in the coming weeks. :)

todd zebert’s picture

subscribe

q0rban’s picture

Status: Needs work » Active
q0rban’s picture

Marked #800072: Yahoo Groups Link as a duplicate of this issue.

erikwebb’s picture

subscribe

I'll look to help commit when I get some time. What approach do you all think is best? Adding an admin form to create new networks? Or some way to do this at the filesystem level?

Erik

scott m. sanders’s picture

A form would be best if possible -- not that most of us can't manipulate files, but some users really wanna be babied with that stuff apparently. ;)

q0rban’s picture

Hi Erik! Ideally, an admin interface that allows you to upload an image and set all appropriate info. The tricky part will be the validation.

erikwebb’s picture

What are you thinking by "validation"? Making sure the service matches the link?

That would be nearly impossible. Why would this need to be done, though?

q0rban’s picture

> Why would this need to be done, though?

This module has the potential to expose the follow fields to any user, and so the potential for abuse needs to be accounted for. You need to at the very least make sure it's a url, but even that can be abused.

Maybe I'm just being overly cautious.

heather’s picture

q0rban, hmm... maybe we need a social barrier, and remind the site administrator to only allow this functionality to trusted users.

I can imagine people would like to add any number of sites we can't even account for.

Are you suggesting that users would submit their own "follow me" info for their profile and the one-by-one the links would need to be moderated by the site admin? I think that's an unusual model. If you're allowing people to place a profile on your site, or add any content, they can link to pretty much *anything*. I wouldn't expect to need to moderate everything they put on their profiles.

If site builders/admins are really concerned about what users put on their profiles, they might already be using "flag this user" or some other social moderation tool.

I think it's another layer of administrative complexity, which doesn't seem like it would be necessary in most cases.

scott m. sanders’s picture

I think the goal is for admins to add custom networks, and users can then use them or not -- not users can add their own custom networks, as that could get chaotic as suggested.

q0rban’s picture

> Are you suggesting that users would submit their own "follow me" info for their profile and the one-by-one the links would need to be moderated by the site admin? I think that's an unusual model.

No, I'm not suggesting that. The way it currently works is it does a regex validation based on the domain. So if you're adding a facebook link, you can't put a twitter link in there instead. It checks to make sure facebook.com is in the url. Not sure if that level of validation should be added here or not, but I thought I'd bring up the discussion.

erikwebb’s picture

If we are only going to allow custom networks to be created by an admin, would it be too harsh to require the admin to enter a correct regex? Can we assume the admin that wants custom networks can write a simple regex? We could even give a thorough example in the help text.

I vote yes. It is still easier than creating a new network in code.

Erik

q0rban’s picture

> If we are only going to allow custom networks to be created by an admin, would it be too harsh to require the admin to enter a correct regex?

Yes, I think it is too much to require it, although it might be a nice option.

Melissamcewen’s picture

"would it be too harsh to require the admin to enter a correct regex?"

As someone who works with small businesses and non-profits, many who use secretaries are site admins...I'd say it would be rather harsh.

skizzo’s picture

I second the regex approach (as done in Custom Username Validation) as it does solve a problem and brings the Custom Network links in line with pre-canned links. It could go under "advanced" settings. If we don't want that option to be always there, we could have a "use advanced settings" permission. Re default link icon: as it takes always to an external site, we could reuse the simple icon from Extlink module.

erikwebb’s picture

+1 skizzo for Advanced tab and permission.

I guess it would default to no URL validation without a regex. Or maybe we could use a "simple" regex and just require a particular domain name (or list of domains) for each network, like facebook.com or flickr.com or groups.yahoo.com.

q0rban’s picture

Marked #865460: Add Yelp as a duplicate of this issue.

erikwebb’s picture

What if we implemented this as a hook rather than more built-in settings to Follow? I'm not sure of the performance implications, but there could be a set of preconfigured networks, then a documented hook to add your own. Then maybe these could be implemented as part of other modules.

q0rban’s picture

Hey, erik! We've already got what you're looking for there: http://drupalcode.org/viewvc/drupal/contributions/modules/follow/follow....

:)

edulterado’s picture

Hi q0rban, I was interested in the #25 solution and I tried to implement it including that code in my template.php, but nothing happened. Even I substituted "hook" for the name of my test_module and didn´t work.

Am I missing something important?

Thanks!

q0rban’s picture

Hey there! What version of follow are you using? (You can look in the follow.info file to find out) Thanks

James

edulterado’s picture

Hi q0rban,

thanks a lot for replying and considering my case.
I don´t know to what extent this is a shortcoming of my PHP skills implementing HOOK (sorry then if this is not the correct issue to be posted here).

I´m using the 6.x-1.4 version.

I also tried some patches and suggestions listed here http://drupal.org/node/695816 though anything worked out.
In the best case, when I used this in my test_module:

function hook_follow_networks_alter(&$networks) {
 // Add a network.
 $networks['mailinglist'] = t('Mailing List');
}

I´m able to add new custom networks but I received an error message about link validation when trying to add a valid link. Even I got that message when I try to modify the link of a previously existing network.

Thanks again for you time, James!

q0rban’s picture

Hi there! Yup, that explains it. You're using version 6.x-1.4, but the file linked to in comment #25 is actually from 6.x-1.x-dev. You might have better luck upgrading to 6.x-1.x-dev. (Make sure you backup first, and run update.php after upgrading). Then you can follow the code examples from follow.api.php. Make sure you replace 'hook' in the example function with the machine name of your module. :)

ndwilliams3’s picture

Another thought on custom networks is integration with ctools.module export and features.module. Additional networks could be implemented as a feature.

q0rban’s picture

Marked #1048008: Support for Xing.com as a duplicate of this issue.

q0rban’s picture

Marked #1063784: Support for Drupal.org and Github.com as a duplicate of this issue.

evelien’s picture

+subscribe
For me, the possibility of adding local networks is a big plus.
I would also like to hide networks. Some of them mentioned now aren't that active within my own country.

Anonymous’s picture

does the link in comment #25 add the ability to define new social networks?

also, the link is not working. if it does do that, can we get a working link again?

IMHO, services like blogger/blogspot should be in that list already... The list is quite short on this module.

Shadlington’s picture

Subscribe.

Also, totally agree with #34 that blogger and blogspot should already be in here!

AntiNSA’s picture

You should have some Chinese networks in there. 25% of the worlds pupulation, you know?

anewman1980’s picture

I was hoping to add custom site RSS feeds. For example blogs. And also RSS for individual users. For example for their blog.

infines’s picture

A solution to this might be to design a wizard to upload a custom icon and create a new field...just a thought.

People usually like designing their own twitter, facebook, etc. icons so it might be smart to make all fields editable and just provide default icons.

midmood’s picture

ipersubscribing! :-)

Shadlington’s picture

Annnnnnnnnd now we need Google+ :)

jmolivas’s picture

This is a small update to the Drupal follow module in order to support Google+ network, to see a demo of this in action just take a look at this blog http://jmolivas.com on the block "Follow me on"

Github
https://github.com/jmolivas/follow

Orignal post entry on my blog
http://jmolivas.com/drupal-follow-google-plus

Shadlington’s picture

Issue tags: +googleplus

Nice. Can you provide this as a patch please?

koppie’s picture

StatusFileSize
new2.06 KB
new1.38 KB
new11.52 KB

Okay, I've got a big patch for y'all. This is my very first patch ever, so please be gentle.

Here's a list of what it does:

  • Adds a tab to the build page, so you can add your very own custom network link using the GUI. No more editing module files or CSS!
  • Still validates links
  • Default icon for custom added links in CSS (small and large versions included)
  • Lets you upload your own icon for your custom links, displays them using an inline style
  • Lets you customize tooltips for any link (I know that's not part of this issue, but I thought it would be useful)
  • Be sure to run update; follow.install adds sql columns for new variables
  • I heavily commented my changes so they should be easy to follow in the code
  • Patch was rolled against latest dev version using git

What's missing:

  • There's no way to edit your icon once you've created a custom network link. But it's not that hard to delete the link and recreate it with a new icon.
  • I wrote this patch with only site links in mind, I'm not sure if it even works with user links.
  • I also didn't add any permissions so admin vs. non-admin should work as before.

Many thanks to q0rban for this classy module. I hope this patch will end all the "please add ____" requests.

koppie’s picture

Status: Active » Needs review
koppie’s picture

StatusFileSize
new12.22 KB

Really, nothing? So many people clamoring for this feature and when it shows up, no one even wants to test it? This module is functioning well on my own sites: http://tenukidesign.com and http://koplowicz.com

q0rban, I would like to come on as a co-maintainer. Are you interested?

In the mean time, here's a new patch, because I forgot to update the schema last time.

q0rban’s picture

Wow, this looks like a hefty patch for a first! Great job, koppie! I hope to have time to review this soon. One word of caution for those testing this patch. Please don't use this on any site you care about due to the schema changes. There are no garauntees that the schema will stay the same.

chrisschaub’s picture

Can this get in?

astonvictor’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

I'm closing it because the issue was created a long time ago without any further steps.

if you still need it then raise a new one.
thanks