Default Follow User On This Site

jonknight - November 7, 2009 - 19:30
Project:Follow
Version:6.x-1.3
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Is there a way I can set a default 'follow this user on this site'?

I'd like for that field to be set when a new user account is created. I've set a block to sit in the right sidebar on profile pages, and without a default it's an empty space.

(I'm not too great at hacking out php solutions yet, still learning. The problem I'm having is that without a default, placing that block in the sidebar causes all heck to break loose on the page's css. The left sidebar moves right the width of the right sidebar and appears over the content, and the right sidebar is gone completely. Adding any valid url causes this behavior to stop. Removing the block causes this behavior to stop. I doubt it's the Follow module causing this, more likely a conflict I have set while I'm learning...)

That being said, I still think it's a great idea to allow admins to set up a default "follow' for individual users on that site. The default should probably set a path to the user's profile.

#1

jonknight - November 7, 2009 - 19:51

Uploading images to show the problem I've described.

follownone.jpg shows the messed up css. User 'test' with zero url's entered.

followgood.jpg shows a beautiful page with several url's entered for user Sneak Peek.

site: http://members.gimmee.net

AttachmentSize
follownone.jpg 63.9 KB
followgood.jpg 57.25 KB

#2

q0rban - November 7, 2009 - 21:15
Category:feature request» support request
Status:active» fixed

Hey Jon!
What about using rules to set up a page redirect to the user's follow links after registration so that they can enter them in right away? You could also set in your page template to display that region even if there are no blocks, and then give it a size and all that with CSS.

I'm not convinced default settings are helpful, but I'm open to hearing more of a case for it. :)

#3

jonknight - November 7, 2009 - 21:35

I understand what you're saying - I normally don't like to lock a user into anything either. My problem with a redirect is that there's no guarantee the user will enter anything at all and we're back to the start.

I'd thought about your second suggestion, just forcing the region to display empty content. I actually like this solution - I think it will motivate folks to fill in some links. I'm a decent enough hack when it comes to the css part but with php I'm definitely a quack. The things I've done have been the result of good guesswork more than any skills.

I've found the appropriate area to edit here, I think. But I totally have no idea how to proceed.

<?php if ($right): ?>
        <div id="sidebar-right"><div id="sidebar-right-inner" class="region region-right">
          <?php print $right; ?>
        </div></div> <!-- /#sidebar-right-inner, /#sidebar-right -->
      <?php endif; ?>

Am I even in the right area? ( I hate sounding so needy, and I really appreciate any help.)

#4

q0rban - November 7, 2009 - 22:20

Hey Jon, try this:

        <div id="sidebar-right"><div id="sidebar-right-inner" class="region region-right">
          <?php print $right; ?>
        </div></div> <!-- /#sidebar-right-inner, /#sidebar-right -->

#5

jonknight - November 8, 2009 - 22:04

Hi q0rban - Tried removing the if condition (something I should have already tried. Thanks.) But that didn't alter the display at all. Yeah, surprised me too.

However, I did decide that a Search might not be in the way on the User Profile page, and now Search makes sure something is there to work with, even if a Member decides not to be very social. The page looks great either way.

I'm surprised that removing the if statement didn't cause the sidebar area to be provisioned on the page. It's most likely something strange I've done elsewhere, but if you'd like more details on my installation feel free to drop me a line.

Thanks for jumping on this on the weekend! You rock.

#6

q0rban - November 9, 2009 - 03:16

Jon, glad you got it figured out. :)

#7

System Message - November 23, 2009 - 03:20
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.