TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 790
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 645
  • Total: 646
  • tino

Quick Register block

Started by Chodhry, June 19, 2006, 02:21:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Techdomain

lol @ me... the code i posted above for center block works fine... it just didnt work when I was still logged in!!! rofl

skiller

#31
Quote from: JRW on November 26, 2006, 10:06:50 AM
I already have it looking like that ( http://www.techdomain.com.au ) but want to put it just under my menu in a center block (so it doesnt annoy me as teh admin. Either that, or making a way that it shows it to JUST guests, not admin would be cool!

could you please help with your site's top (yellow) register bar?
i've been wanting to make one - but somehow it never worked out :(
Thanks.

Techdomain

Ok... I made it work for Aero_79 (which is my default theme) so it displays the quick registration to guests only:

Code (Find) Select

echo '
<div id="outer">
   <div id="hello">';
   if($context['user']['is_logged']){
      echo '<a align="left">', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b>', '</a>';
      echo '<span class="smalltext">';
      if ($context['allow_pm'])
         echo  '<br />',$txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
      echo '</span>';
   }
   else
      echo $txt['welcome_guest'];

   echo '
   </div>
   <table id="top" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td class="headerdown" align="left" width="30%" style="padding-right: 8px;">
                     <b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], ' ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span><br />
                                                        ', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
              </td></tr>
   </table>';


Code (Replace) Select

echo '
<div id="outer">';
   if($context['user']['is_logged']){
      echo ' <br>', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , ' Welcome to TechDomain!</b>';
   }
   else echo '<table id="top" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><form action="../index.php?action=register2" method="post" name="creator" id="creator" onsubmit="return verifyAgree();"><table border="0" cellpadding="3" cellspacing="0"><tr><td>Choose username:<input type="text" name="user" size="10" tabindex="1" maxlength="25" /></td><td> Email:<input type="text" name="email" size="15" maxlength="50" tabindex="2" /></td><td><label for="hideEmail">
<input type="checkbox" name="hideEmail" id="hideEmail" class="check" value="ON" /> Hide email?</td><td>Choose password:<input type="password" name="passwrd1" size="8" tabindex="3" /></td><td> Verify Password:<input type="password" name="passwrd2" size="8" tabindex="4" /></td><td><label for="regagree"> <input type="checkbox" name="regagree" onclick="checkAgree();" id="regagree" class="check" value="ON" /></td><td> Agree to <a href="../index.php?action=register">terms. </label></td><td><input type="submit" name="regSubmit" value="Register" /></td></tr></table></form></td></tr></table>';


Obviously that replaces the whole "welcome user, you have x amt of PM's there are x amt of users who have made x amt of posts" bit.

Example http://www.techdomain.com.au

I have added pics of "Guest" view and "Logged" View.

PS the yellow bar is the "regbar" mod available at SMF (I did have to manually install it) If I can be of further assistance for it, let me know.

skiller

thanks... but newbie here... what file.php to replace the code?

Techdomain

ah sorry: index.template.php in /Themes/Aero79_TP

It should be possible to modify this to work with most themes (let me know if you want one inparticular modded)

skiller

the code you asked to find to replace doesnt exit in my template. i use TP 0.96beta and default theme to add the quick register mod.

i also downloaded the regbar mod but help needed on how to proceed with its installation..
thanks.

Techdomain

I can help you with the regbar mod, and throwing the code above into the default theme... but we should prolly move to another thread.
Did you try to install the mod with the package manager?
If you trust me, PM me the details to an admin account for your server (FTP info will be needed too actually).

skiller

Quote from: JRW on November 26, 2006, 11:39:19 AM
I can help you with the regbar mod, and throwing the code above into the default theme... but we should prolly move to another thread.
Did you try to install the mod with the package manager?
If you trust me, PM me the details to an admin account for your server (FTP info will be needed too actually).

have successfully installed the regbar mod using package manager as you advised. but is there a way to customize the text it displays in the bar? hopefully a solution can be figured out for the quick register module as well.
regards!

Techdomain

yes -
go to /Themes/default/languages and the file there modifications.english.php - in there, find the regbar mod (or the text that it displays) and change it :)

can you post a copy of your /Themes/default/index.template.php and I will have a go at adding the code (or email it to me at john -at- techdomain.com.au)

skiller

Quote from: JRW on November 26, 2006, 11:52:03 AM
yes -
go to /Themes/default/languages and the file there modifications.english.php - in there, find the regbar mod (or the text that it displays) and change it :)

can you post a copy of your /Themes/default/index.template.php and I will have a go at adding the code (or email it to me at john -at- techdomain.com.au)

have sent you link in PM :)

This website is proudly hosted on Crocweb Cloud Website Hosting.