[support] Trouble with a theme

Christopher M. Jones cjones at partialflow.com
Thu Nov 11 23:25:01 UTC 2010


Prothero, did you get an answer to this? I don't see one.

solarsentinel is providing a theme function to generate the block in 
question. The theme function, as you surmised, simply doesn't provide 
the register link.

You could simply add a line like this:

$form['register_link'] = array(
   '#value' => l(t('Register'), 'user/register'),
   '#prefix' => '<div id="sl_register">',
   '#suffix' => '</div>',
   );

If possible, I'd also modify the existing code to conform to Drupal best 
practices; i.e., using l() instead of hard coding the anchor markup, and 
wrapping the link text in t().

On 11/06/2010 01:24 PM, prothero wrote:
> Victor:
> Thanks. It appears to be in the code ( in the template.php file related
> to this is:
>
> function solarsentinel_user_login_block(&$form){
>
> $form['links'] = array('#value' => '<div id="sl_lostpass"><a
> href="/user/password">Request new password</a></div>');
>
> return drupal_render($form);
> }
>
> I don't know enough php (and it's Drupal application) to brave changing
> it. It looks easy, but... devil's in the details. How should I change it
> to add in the "Create Account" with a link to /user/register? If I just
> add an array element, will that fix it?
>
> The other problem I've noticed is that the message that directs users to
> check their email for further instructions, after a new account is
> created, is missing from the front page. Any suggestions as to how to
> approach this fix?
>
> Thanks for the help.
> Bill
>
>
> William A. Prothero
>
> http://earthednet.org/
>
>
>
>
> On Nov 6, 2010, at 2:08 AM, Victor Kane wrote:
>
>> The http://www.rockettheme.com/drupal-downloads page doesn't allow
>> free downloads of the commercial theme you are discussing.
>>
>> Check out the following handbook page, to see what overriding code in
>> the theme may be causing the trouble:
>>
>> Customizing user login, etc page:
>> http://drupal.org/node/350634
>>
>> Customizing user registration block:
>> http://drupal.org/node/493650
>>
>> Victor Kane
>> http://awebfactory.com.ar
>>
>> On Fri, Nov 5, 2010 at 9:57 PM, prothero <prothero at geol.ucsb.edu
>> <mailto:prothero at geol.ucsb.edu>> wrote:
>>
>>     Victor and Marty:
>>     Thanks for your suggestion. I have done this. The Login block does
>>     show. It just doesn't contain the "Register" link. It's fine with
>>     Garland. SolarSentinel doesn't show it.
>>     Bill
>>
>>     William A. Prothero
>>     http://earthednet.org/
>>
>>
>>
>>     On Nov 5, 2010, at 2:46 PM, Marty Landman wrote:
>>
>>>     Hi Bill,
>>>
>>>     You may have already tried this but just in case, check in the
>>>     admin > site building > blocks section to be sure that the user
>>>     login
>>>     is enabled. If you want a link to user login that's something that
>>>     can be checked in the admin > site building > menus section.
>>>
>>>     Marty
>>>
>>>     At 05:38 PM 11/5/2010, prothero wrote:
>>>>     Folks:
>>>>     I hope I can get some help here. The RocketTheme folks aren't
>>>>     responsive.
>>>>     I use the SolarSentinel theme. I want new users to be able to
>>>>     register. I have set, in the "User Settings" admin interface, the
>>>>     "Visitors can create accounts and no administrator approval is
>>>>     required" option. However, I don't see the link to the
>>>>     /user/register node that lets a user create a new account. When I
>>>>     switch to the Garland theme, I do see this link, so it appears
>>>>     to be
>>>>     a problem with the theme.
>>>>
>>>>     This kind of problem makes drupal very frustrating for a newbie. As
>>>>     in several other issues like making the front page content show and
>>>>     making comments show, which require php file edits, this is
>>>>     probably
>>>>     some interior php file that must be edited. I've searched thru the
>>>>     php files for something obvious, but no dice.
>>>>
>>>>     Thanks,
>>>>     Bill
>>>
>>>     --
>>>     Open first 10 Google results in 10 new tabs
>>>     https://addons.mozilla.org/af/firefox/addon/181910/
>>>
>>>     --
>>>     [ Drupal support list | http://lists.drupal.org/ ]
>>
>>
>>     --
>>     [ Drupal support list | http://lists.drupal.org/ ]
>>
>>
>> --
>> [ Drupal support list | http://lists.drupal.org/ ]
>


More information about the support mailing list