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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 136
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 110
  • Total: 110

screening those not logged in, in a html article

Started by iGate, April 17, 2008, 10:25:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

iGate

hi all

i have a html article contains some txt and a simple link at the bottom.
http://ihf.lp.pl/index.php?page=7

i want to place some code to allow only those who are logged in to view the article.
those who are not logged in would then be requested to login or register.

this is my code:

<p><font face="Arial" size="2">Dear =IHF= prospect,</font></p>
<p><font face="Arial" size="2">=IHF= </font><font face="Arial" size="2">is almost rankless (some people have responsibilities... but not 'power') everyone is treated as equals, you do what u want, when u want, and no one has anything to say about it (there are some limits but we'll get to them later). Instead of having the leaders make decisions, clan matters are voted upon by the entire clan where everyone's vote is treated as equal. It is then up to the leaders to carry out the decision. =IHF= refuses to put any ads on the site, and we rely solely on our members' donations in order to keep the clan alive. Donations aren't required, but those who do donate get admin on the A*A server, a special status group in the =IHF= forum, not only that you get this warm fuzzy feeling that you have contributed to something worth while.<br />
<br />
There are some limits on your freedoms, but we all feel they are minimal and most people don't even know they are there because they wouldn't do bad stuff anyway. We just ask you to please take 2 or 3 minutes to read over our brief overview of the Recruitment Process, Code of Conduct and Clan Requirements. Make sure that you understand, agree to follow and enforce our rules before continuing on with a membership application.</font><br />
<br />
<font face="Arial" size="2">Joining our Clan is not fast. Its not that we are not picky, it is that we need to get to know you well before you are accepted.</font></p>
<p><font face="Arial" size="2">The whole process looks like this in short:</font></p>
<p><font face="Arial" size="2">First you should read our rules <a href="http://forum.ihf.lp.pl/index.php?board=15.0">here:</a>. Then read other parts of our forums, post, ask any questions and most important play with us.</font></p>
<p><font face="Arial" size="2">When you are sure you really want to join =IHF= please post your application as below. It will be reviewed by us and after about a week you will be accepted (or not) and you will be able to change your name to =IHF=YourName[r], where [r] means recruit. You will be in [r] for about a month and during this time, minimum one month, you need to play with us as much as you can and get as many good opinions about you as you can from our Members, especially Clan Leaders. You also must show us how much can you increase your game stats in that time, that you are mature and friendly.</font></p>
<p><font face="Arial" size="2">You will also need the flowing requirements to get into the main =IHF= clan.</font></p>
<p><font face="Arial" size="2">You must play AA version 2.5 (mainly)<br />
You must be nice, friendly and mature person<br />
AA game account: ABSOLUTELY CLEAN ACCOUNT! NO BANS FOR CHEATING! EVER! INCLUDING LINKED ACCOUNTS!<br />
Public account on http://www.aaotracker.com/<br />
Honor: &gt; 25<br />
Age: &gt; 15<br />
FR: &gt; 0.8 (on aaotracker.com)<br />
Kills: &gt; 200 (on aaotracker.com)<br />
ROE: &lt; 1/5 * Score (on aaotracker.com)<br />
Clans: no more than 3 clan changes in last half a year</font></p>
<p><font face="Arial" size="2">Rationale and notes:<br />
1. Account - we don't want cheaters! We will scan your account history completely in different sources and if we will suspect you are cheater we will not accept you.</font></p>
<p><font face="Arial" size="2">But we understand that people do stupid things in their lives, especially when they are young. So if you cheated in the past and you are really, really sorry for cheating you can clean yourself a little:<br />
&nbsp;* stop using cheats FOR EVER!<br />
&nbsp;* forget about your AA account, don't EVER log on it again<br />
&nbsp;* format your hard drive and reinstall your operating system (completely), this is REQUIRED (of course you can backup you data, but not AA files)<br />
&nbsp;* if you have static IP try to change it somehow, if you have dynamic IP (most DSLs and cable providers) you can skip this step<br />
&nbsp;* if it is possible change or upgrade your computer: especially network card (if you are using one), possibly disk drive, maybe even mainboard<br />
&nbsp;* stop playing AA for 1 month<br />
&nbsp;* after that 1 month passes create completely new AA account, with different name<br />
&nbsp;* install new version of AA on your computer<br />
&nbsp;* do basic training, play for some time to meet our requirements<br />
Now: this is long and painfull procedure. It does not even guarantee you will clean yourself completely (especially if you have static IP or your MAC - simply: value computed from some computer parts serial numbers - stays the same somehow) but it should be painfull. Cheater should be punished and this is part of your punishment.</font></p>
<p><font face="Arial" size="2">2. Honor - This shouldn't be very hard if you are good player. If you have much lower honor you won't have any chances during clan battles.</font></p>
<p><font face="Arial" size="2">3. Age - Generally you must be over 13. But it looks like people over 15 are way more mature. We had very big problems with very young people before and we don't want to repeat them. But of course if you are 14 years old and good enough as a player we can accept you.</font></p>
<p><font face="Arial" size="2">4. FR&nbsp;- &nbsp;We don't care about FR too much (if your in the recruits). If not, we would require as said at least 0.80 FR.</font></p>
<p><font face="Arial" size="2">5. Kills - You should be registered on aaotracker long enough to make these stats mean something. On the other hand making 400 kills shouldn't take you too long if you are good.</font></p>
<p><font face="Arial" size="2">6. ROE - We hate idiots killing teammates. It happens from time to time but it must be really from time to time! Most good players have no problems with keeping it &lt; 0.1 * Score so 1/5 should not be that hard.</font></p>
<p><font face="Arial" size="2">7. Clan changes - Well, if you want to join our clan you are making decisions for months or even years, not days or weeks or hours! We don't need members that quit before we can even register them fully!</font></p>
<p><font face="Arial" size="2">Once in =IHF= you will be part of the recruits. You can then change your name to =IHF=YourName[r]. As a recruit =IHF= clan member you will receive the tracker password for the recruits and you will have all rights and responsibilities (helping other members, taking part in important CBs, being a leader or getting some other important job to do). After&nbsp;you have reached the main clan standard, in a&nbsp;month or sooner, you will join the main clan. You&nbsp;can take off your recruits tag and join the main clan tracker. There is no limit on number of Members in =IHF=, simply if you are good enough, pass all the rules and have good opinions from others you get in. Also note that these rules may be relaxed at special occasions and for special recruits.<br />
</font><font face="Arial" size="2"><br />
Thank you for reading through this article, please fill out the application on the next page.</font> </p>
<form>
</form>
<p><font size="2">&nbsp;</font></p>
<p><font size="2">&nbsp;</font></p>
<p><font size="2">&nbsp;</font></p>
<p align="center"><font size="2"><input type="button" onclick="location.href='http://ihf.lp.pl/index.php?page=9'" value="Next..." /></font></p>


i know i have to use some code to this along the lines of:

if $context['user']['is_logged']){

to show it when they are logged in, but to do this i need a php article.
when i do that i screw up my html code.

also i dont know how to get them to register or login if they are not.

help much appreciated thx.

iGate

ed_m2

can you not use a php article with a very looong echo..

echo '
html stuff
';


shuld work assuming you have no ' in your html  :P

ed_m2

or alternatively... save your html as a file on the server... and then include it in a php article ?

ok for a one off, but maybe a  pain if you want to do this many times.

iGate

#3
i couldn't get either to work.
thx for ur help

IchBin

if ($context['user']['is_logged']){
     echo 'all your html inbetween these two single quotes that you want displayed to users who are logged in';
}
else {
    echo 'all the stuff here for guests';
}

iGate


This website is proudly hosted on Crocweb Cloud Website Hosting.