Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06-17-2014, 12:28 AM
Infernette Infernette is offline
CODE CODE CODE CODE CODE
 
Join Date: Jan 2013
Location: Where I live? I live home.
Posts: 164
Gender: Female
Credits: 23,883
Infernette is on a distinguished road
Default Looking on some input on how to do this.

Currently I want to make it so after a user registers, they cannot use their account until they choose a few on-site options.

I was wondering how I would go about simply 'locking someone out of their account' and having the site show just the page to select an option if they do not have it set already (EX in users_options the user does not have the column "clan" set to anything yet(as in it is set to 'none' once they register, so no matter what page they go on it always displays a specific page(even if they go to the index or a level up page, it still shows this page).

Is this even possible? And if it is, is it able to have a sort of succession of pages that the user has to confirm with before they can use the account?

If its incredibly difficult or unheard of feel free to ignore my ramblings it's 1am and I'm still recovering from dentist work.
__________________
No, I have no idea what I'm doing. But it works. Barely.
Reply With Quote
  #2  
Old 06-17-2014, 01:00 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 19,391
IntoRain is on a distinguished road
Default

In smarty this is quite easy to do.

Open class_template, look for a function called assignTemplateVars(). Inside, get two variables, one for the clan (the one you talked about) and one with the content you want. Assign them to the template like this:

$this->assign("clan",$clanVariable);
$this->assign("optionalContent",$contentVariable);

In your template.tpl, search for the part where {$document_content} appears. Replace {$document_content} with:

{if $clan != 'none'}
{$document_content}
{else}
{$optionalContent}
{/if}

This basically makes it so that while their clan is "none", all they ever see is the optional content you created, in place of the document_content, in all pages
__________________


asp.net stole my soul.

Last edited by IntoRain; 06-17-2014 at 01:02 PM.
Reply With Quote
  #3  
Old 06-17-2014, 04:54 PM
Infernette Infernette is offline
CODE CODE CODE CODE CODE
 
Join Date: Jan 2013
Location: Where I live? I live home.
Posts: 164
Gender: Female
Credits: 23,883
Infernette is on a distinguished road
Default

Thank you, this is perfect! Now I can add a small tutorial to my site. Thank you :3
__________________
No, I have no idea what I'm doing. But it works. Barely.
Reply With Quote
  #4  
Old 06-17-2014, 05:33 PM
Infernette Infernette is offline
CODE CODE CODE CODE CODE
 
Join Date: Jan 2013
Location: Where I live? I live home.
Posts: 164
Gender: Female
Credits: 23,883
Infernette is on a distinguished road
Default

Though, there is one issue- not logged in people cannot view the site as normal.
__________________
No, I have no idea what I'm doing. But it works. Barely.
Reply With Quote
  #5  
Old 06-17-2014, 06:34 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 19,391
IntoRain is on a distinguished road
Default

Try adding this:

$this->assign("logged_in",$mysidia->user->isloggedin);

And then doing this:

{if $clan != 'none' or !$logged_in}
{$document_content}
{else}
{$optionalContent}
{/if}
__________________


asp.net stole my soul.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete the Search Input... trollis76 Questions and Supports 9 02-21-2009 10:17 AM


All times are GMT -5. The time now is 08:41 PM.

Currently Active Users: 9880 (0 members and 9880 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636