News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Should Registration.txt be in register.php

Started by SaltedWeb, December 11, 2017, 02:05:28 PM

Previous topic - Next topic

SaltedWeb

I noticed a black registration page text, and why I can just edit the page itself.
I noticed in Register.php their was no Register.php
I only have a couple mods.

1.   Ultimate Menu   1.0     
2.   Simple Audio Video Embedder   4.2.1     
3.   SimplePortal   2.3.7     
4.   Global Headers Footers   2.0.1     [
5.   SMF Gallery Lite   6.0     
6.   SMFBlog   2.0     
7.   SA KB  ( knowledge base)
Its not a huge deal just wondered if it was supposed to be in that file lined somewhere
and if so might be why its showing blank. I did a test install and didn't see the registration.txt in that Register.php either.
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Sir Osis of Liver

The registration agreement is in agreement.txt in forum root.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

SaltedWeb

Right, I guess I am wording it wrong,

I am trying to find out what is pointing to it ( the TXT). I can edit it in the root,
But it shows up blank in Admin, but is ok when ppl register so somewhere its not pointing where it should read it.
I know its supposed to show up in Admin so bugged me what is pointing to that file is missing a line somewhere or is edited out.
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Sir Osis of Liver

Look for function EditAgreement() in ManageRegistration.php.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

SaltedWeb

#4
Hi there I took a look at active view the one on the forum I am trying to resolve
and the default from the file that comes with Install. I didnt see any changes.
Also the line count seems the same not that that really matters.
I did a line by line comparison of ManageRegistration.php they were exactly the same.
So it should be pointing to the right file. The permission for Agreement.txt is set correctly as well at 0644

(Active View.)

function EditAgreement()
{
   global $txt, $boarddir, $context, $modSettings, $smcFunc, $settings;

   // By default we look at agreement.txt.
   $context['current_agreement'] = '';

   // Is there more than one to edit?
   $context['editable_agreements'] = array(
      '' => $txt['admin_agreement_default'],
   );

   // Get our languages.
   getLanguages();

**********************************************************************************

(Default Below with default file)


function EditAgreement()
{
global $txt, $boarddir, $context, $modSettings, $smcFunc, $settings;

// By default we look at agreement.txt.
$context['current_agreement'] = '';

// Is there more than one to edit?
$context['editable_agreements'] = array(
'' => $txt['admin_agreement_default'],
);

// Get our languages.
getLanguages();
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Sir Osis of Liver

Maybe something's screwed up in the template -

Register.template.php



echo '
<form action="', $scripturl, '?action=admin;area=regcenter" method="post" accept-charset="', $context['character_set'], '">';

// Show the actual agreement in an oversized text box.
echo '
<p class="agreement">
<textarea cols="70" rows="20" name="agreement" id="agreement">', $context['agreement'], '</textarea>
</p>
<p>
<label for="requireAgreement"><input type="checkbox" name="requireAgreement" id="requireAgreement"', $context['require_agreement'] ? ' checked="checked"' : '', ' tabindex="', $context['tabindex']++, '" value="1" class="input_check" /> ', $txt['admin_agreement'], '.</label>
</p>
<div class="righttext">
<input type="submit" value="', $txt['save'], '" tabindex="', $context['tabindex']++, '" class="button_submit" />
<input type="hidden" name="agree_lang" value="', $context['current_agreement'], '" />
<input type="hidden" name="sa" value="agreement" />
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
</div>
</form>


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

SaltedWeb


The area looks identical to your example, I appreciate your help Osis.
Might be something i'll just have to edit in Root, its not a huge deal just wondered what was making it not work
as it should. I mean how often does one have to edit the agreement. Thank you Sir Osis, I appreciate your time looking at it, but its not that crucial
just bugged me it didn't work.



Quote from: Sir Osis of Liver on December 11, 2017, 10:34:34 PM
Maybe something's screwed up in the template -

Register.template.php



echo '
<form action="', $scripturl, '?action=admin;area=regcenter" method="post" accept-charset="', $context['character_set'], '">';

// Show the actual agreement in an oversized text box.
echo '
<p class="agreement">
<textarea cols="70" rows="20" name="agreement" id="agreement">', $context['agreement'], '</textarea>
</p>
<p>
<label for="requireAgreement"><input type="checkbox" name="requireAgreement" id="requireAgreement"', $context['require_agreement'] ? ' checked="checked"' : '', ' tabindex="', $context['tabindex']++, '" value="1" class="input_check" /> ', $txt['admin_agreement'], '.</label>
</p>
<div class="righttext">
<input type="submit" value="', $txt['save'], '" tabindex="', $context['tabindex']++, '" class="button_submit" />
<input type="hidden" name="agree_lang" value="', $context['current_agreement'], '" />
<input type="hidden" name="sa" value="agreement" />
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
</div>
</form>






echo '
<form action="', $scripturl, '?action=admin;area=regcenter" method="post" accept-charset="', $context['character_set'], '">';

// Show the actual agreement in an oversized text box.
echo '
<p class="agreement">
<textarea cols="70" rows="20" name="agreement" id="agreement">', $context['agreement'], '</textarea>
</p>
<p>
<label for="requireAgreement"><input type="checkbox" name="requireAgreement" id="requireAgreement"', $context['require_agreement'] ? ' checked="checked"' : '', ' tabindex="', $context['tabindex']++, '" value="1" class="input_check" /> ', $txt['admin_agreement'], '.</label>
</p>
<div class="righttext">
<input type="submit" value="', $txt['save'], '" tabindex="', $context['tabindex']++, '" class="button_submit" />
<input type="hidden" name="agree_lang" value="', $context['current_agreement'], '" />
<input type="hidden" name="sa" value="agreement" />
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
</div>
</form>
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Sir Osis of Liver

The reason it's blank is because $context['agreement'] is empty.  Something is preventing it from loading in the array, possibly a mod.  I never use admin to edit anything, you can edit agreement.txt like any other file via ftp.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

SaltedWeb

I probably will pointing it to a html since I will be editing anyways :-)
I am pretty sure its a mod but I need the ones I have so a root edit is easier.

But thanks again. 8)
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Advertisement: