Great! I'll keep that in mind for when I add the admin option to set that.<br>-- <br>Dan Ziemecki<br>Philosopher. Curmudgeon. Nerd.
<br><br><div><span class="gmail_quote">On 4/6/06, <b class="gmail_sendername">VJ Rao</b> <<a href="mailto:cmsconsultant@gmail.com">cmsconsultant@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;">isset($user->subscriptions_auto) ? $user->subscriptions_auto : true<br><br>Seems to work. </div><div style="direction: ltr;"><span class="e" id="q_10a6e6333d44e014_1"><br><br><div><span class="gmail_quote">
On 4/5/06, <b class="gmail_sendername">Dan Ziemecki</b> <<a href="mailto:dan@ziemecki.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
dan@ziemecki.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="direction: ltr;">I'm at work right now, so I can't give you the exact column, but the trick you're missing is that most site and user configurations are stored in a serialized array, not a separate field. Since the system tables have no idea what modules you'll be running, they store all the module variables in a single field.
<br><br>The code on the particular field is the right place to make your modification, but I may have given you the wrong way to do it. Unfortunately, other people have worked on the module and I don't completely understand all of what other people have done. And I was sleepy when I answered your email. This, however, I do know: the checkbox element has a 'checked' value you can set to any state you want. If you set the checkbox to 'checked', but only if the user has not set a value, you should be golden.
<br><br>Check this out:<br><br><a href="http://drupaldocs.org/api/4.6/function/form_checkbox" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://drupaldocs.org/api/4.6/function/form_checkbox</a>
<br><br>That 'checked' variable needs something that operates like this:
<br><br>if(isset(subscriptions_auto){$checked=subscriptions_auto;}else{$checked=strue;}<br>... or something like that.<br clear="all"></div><div style="direction: ltr;"><span><br>-- <br>Dan Ziemecki<br>Philosopher. Curmudgeon. Nerd.
</span></div><div style="direction: ltr;"><span><br><br><div><span class="gmail_quote">On 4/5/06, <b class="gmail_sendername">VJ Rao</b> <<a href="mailto:cmsconsultant@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
cmsconsultant@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Dan,<br><br>I have tried that option. Problem with changing it to 'true' or '1' is<br>that the checkbox functionality gets messed up.<br><br>If an user unchecks autosubscribe in his user settings and<br>'saves'..the next time he clicks on edit profile it shows as checked .
<br>this is bound to confuse users.<br><br>The functionality Im looking for is , when a new user account is<br>created ..auto subscribe is checked by default. But ofcourse, since we<br>are giving him an option to uncheck it..it should remain unchecked
<br>once he unchecks it.<br><br>This is why I wanted to know which database table column stores this<br>information.<br><br>I am also confused what $user->subscriptions_auto offers since there<br>is no subscriptions_auto column anywhere .
<br><br>Regards,<br><br>V<br><br><br>On 4/4/06, Dan Ziemecki <<a href="mailto:dan@ziemecki.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">dan@ziemecki.com</a>> wrote:<br>> I never made that a configurable option, but you can fix it in the code, if
<br>> you want to. Find this line in
subscriptions.module:<br>><br>> return array(array('title' => t('Subscription settings'), 'data' =><br>> form_checkbox(t('Automatically subscribe to threads in which you post.'),<br>> 'subscriptions_auto', 1, isset($edit->subscriptions_auto) ?
<br>> $edit->subscriptions_auto : $user->subscriptions_auto, t('Checking this box<br>> allows you to be automatically subscribe to any thread you create or post a<br>> comment to.'))));<br>><br>> Look at this section:
<br>> isset($edit->subscriptions_auto) ?<br>> $edit->subscriptions_auto : $user->subscriptions_auto<br>><br>> I think you can change ...<br>><br>> : $user->subscriptions_auto<br>><br>> to
<br>><br>> : true<br>><br>> That's someone else's edit, so I'm not sure what "$user->subscriptions_auto"<br>> is supposed to offer, thut that whole block is the "checked: value of the<br>
> checkbox.<br>><br>> I should probably add this as an option - I've had people ask about it<br>> before.<br>><br>> --<br>> Dan Ziemecki<br>><br>><br>><br>> On 4/4/06, VJ Rao <<a href="mailto:cmsconsultant@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
cmsconsultant@gmail.com</a>> wrote:<br>> > Hi,<br>> ><br>> > Im using subscriptions module for 4.6<br>> ><br>> > How do I make 'auto subscribe' feature default? I couldnt find a way<br>> > through settings.
<br>> ><br>> > If I have to do this in code, which table/column stores this information?<br>> ><br>> > Thanks,<br>> ><br>> > V<br>> ><br>><br>><br></blockquote></div><br>
</span></div></blockquote></div><br>
</span></div></blockquote></div><br>