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

Recent

Welcome to TinyPortal. Please login or sign up.

May 05, 2024, 09:17:30 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,178
  • Total Topics: 21,220
  • Online today: 291
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 224
  • Total: 224

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.

Chodhry

hmmm. I have taken a quick look. It seems possible. I yet have to install the code on one of my test forums. BTW, do you know what files it chages/add of the forum.

zillion

#11
Hmm.  Advice needed!

On my site here, with the Quick Register Block as-supplied, if I click on the 'Terms' link it doesn't open the Registration Terms as I expected, but instead goes to my default (file-not-found) page.   The link appears to be to "<a href="../index.php?action=register">" but putting that (full path http://ccgi.zillion.plus.com/netsandedges/index.php?action=register) into my browser just brings-up the 'standard' registration page.

Changing the 'Terms' link to "./agreement.txt" (as I now have) brings-up the actual Registration agreement, but full-page with no formatting (ie crap-looking to boot!).  Can anyone tell me how to bring this up in the centre column (ie as a link to an Article might)?

cobby

#12
When i try this code out i input the code into a phpblock and i get this code back

<table border="0"><tbody><tr><td><table cellspacing="0" cellpadding="3" border="0"><tbody><tr><td><strong>Choose username:</strong></td></tr><tr><td>&nbsp;</td></tr><tr><td><strong>Email:</strong></td></tr><tr><td><br />Hide email address from public?</td></tr><tr><td><strong>Choose password:</strong></td></tr><tr><td>&nbsp;</td></tr><tr><td><strong>Verify password:</strong></td></tr><tr><td>&nbsp;</td></tr><tr><td><strong>I Agree to the </strong><strong><a href="?action=register">terms.</a></strong></td></tr><tr><td>&nbsp;</td></tr></tbody></table></td></tr></tbody></table>

it rips the form statements right out. what am i possibly doing wrong here?

you can see the code in action. http://www.domainzone.us

jacortina

Your input field size are too long (at least that's one thing wrong).

Try changing the '30's to '20's.

cobby

i already fixed both the inputs and the script. in the instructions he tells you to use a htmlblock but it should be a scriptblock. just so you kniw

jacortina

#15
Well, when I looked at the source code that the page serves up, it shows the top input, which fits, as being length 20 and it shows the next inputs as being length 30 when you first posted it.

If it's html, it will work in an HTML block.

Xarcell

#16
I took this a small step further and cleaned it up a bit. It will also fit into a normal sized panel.

In a phpblock add:

echo '<div>
<form action="../index.php?action=register2" method="post" name="creator" id="creator" onsubmit="return verifyAgree();">
 
    <table border="0" cellpadding="3" cellspacing="0">
<tr>
  <td><b>' , $txt[35] , ':</b></td>
</tr>
<tr>
  <td><input type="text" name="user" size="20" tabindex="1" maxlength="20" /></td>
</tr>
<tr>
  <td><b>' , $txt[69] , ':</b></td>
</tr>
<tr>
  <td class="smalltext"><input type="text" name="email" size="20" tabindex="2" /><label for="hideEmail"><br /><input type="checkbox" name="hideEmail" id="hideEmail" class="check" value="ON" /> ' , $txt[721] , '</label></td>     </tr>
  <tr>
   <td><b>' , $txt[81] , ':</b></td>
  </tr>
  <tr>
   <td><input type="password" name="passwrd1" size="20" tabindex="3" /></td>
  </tr>
  <tr>
   <td><b>' , $txt[82] , ':</b></td>
  </tr>
  <tr>
   <td><input type="password" name="passwrd2" size="20" tabindex="4" /></td>
  </tr>
  <tr>
   <td class="smalltext"><label for="regagree"><input type="checkbox" name="regagree" onclick="checkAgree();" id="regagree" class="check" value="ON" /> <b>', $txt[quick_register_agree] , ' <a href="', $scripturl, '?action=register">', $txt[quick_register_terms] , '</b></a>.</label></td>
  </tr>
  <tr>
   <td><input type="submit" name="regSubmit" value="Register" /></td>
  </tr>
  </table>
 
</form>
</div>';


For a smaller version use this:

echo '<div>
<form action="../index.php?action=register2" method="post" name="creator" id="creator" onsubmit="return verifyAgree();">
 
    <table border="0" cellpadding="3" cellspacing="0">
<tr>
  <td class="smalltext" ><b>' , $txt[35] , ':</b></td>
</tr>
<tr>
  <td class="smalltext" ><input type="text" name="user" size="20" tabindex="1" maxlength="20" /></td>
</tr>
<tr>
  <td class="smalltext" ><b>' , $txt[69] , ':</b></td>
</tr>
<tr>
  <td class="smalltext"><input type="text" name="email" size="20" tabindex="2" /><label for="hideEmail"><br /><input type="checkbox" name="hideEmail" id="hideEmail" class="check" value="ON" /> ' , $txt[721] , '</label></td>     </tr>
  <tr>
   <td class="smalltext" ><b>' , $txt[81] , ':</b></td>
  </tr>
  <tr>
   <td class="smalltext" ><input type="password" name="passwrd1" size="20" tabindex="3" /></td>
  </tr>
  <tr>
   <td class="smalltext" ><b>' , $txt[82] , ':</b></td>
  </tr>
  <tr>
   <td class="smalltext" ><input type="password" name="passwrd2" size="20" tabindex="4" /></td>
  </tr>
  <tr>
   <td class="smalltext"><label for="regagree"><input type="checkbox" name="regagree" onclick="checkAgree();" id="regagree" class="check" value="ON" /> <b>', $txt[quick_register_agree] , ' <a href="', $scripturl, '?action=register">', $txt[quick_register_terms] , '</b></a>.</label></td>
  </tr>
  <tr>
   <td class="smalltext" ><input type="submit" name="regSubmit" value="Register" /></td>
  </tr>
  </table>
 
</form>
</div>';


I have used language strings instead of written text. However there is 2 strings you need to add. Open file located in: "themes > default > languages > index.english.php".

Before ?> add:

$txt[quick_register_agree] = 'I agree to the';
$txt[quick_register_terms] = 'terms';


Save.

I'm also working on trying to create a pop-up of just the written agreement when you click on terms, but haven't had any luck so far.


skiller

#17
Hi Xarcell,

everything seemed to be working fine, until i checked my forum error logs - a freaking 3500 pages!!! ALL of the errors are with the quick register mention.

here is what is displayed for every guest or member and these lines seem to be repeated every time the visitor views a new topic (and it goes very fast as i've got a busy forum)

8: Use of undefined constant quick_register_agree - assumed 'quick_register_agree'
/public_html/Sources/Load.php(1049) : eval()'d code
562

8: Use of undefined constant quick_register_terms - assumed 'quick_register_terms'
/public_html/Themes/default/index.template.php (eval?)
Line: 610

8: Use of undefined constant quick_register_terms - assumed 'quick_register_terms'
public_html/Sources/Load.php(1049) : eval()'d code
563

Apply Filter: Only show the errors with the same message
8: Use of undefined constant quick_register_agree - assumed 'quick_register_agree'
public_html/Themes/default/index.template.php (eval?)
Line: 609

8: Use of undefined constant quick_register_agree - assumed 'quick_register_agree'
/public_html/Themes/default/Display.template.php (eval?)
Line: 29

i had installed some other SMF hack before - the smf blog hack from smfhacks.com and i think thats when these error started. i checked the index.template.php file and the last two lines that i had added were not in the file anymore, so i added them again, but still not work.

advice needed!!

Thanks!

IchBin

Did you add the language strings that he defined at the bottom of his post.

skiller

Quote from: IchBinâââ,¬Å¾Ã,¢ on November 25, 2006, 09:32:30 PM
Did you add the language strings that he defined at the bottom of his post.

i followed every step carefully and reviewed the instructions more than a dozen times. no luck.
is there any way to clean the code off my .php files based from the line code errors shown?
there is a huge buildup of errors and i'm afraid my database will be oversized and saturated in a couple of hours from now. unless i sit clicking to empty the error log...all night!?!