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,973
  • Latest: NonStop
Stats
  • Total Posts: 196,236
  • Total Topics: 21,353
  • Online today: 739
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

Article Help

Started by kjb0007, December 28, 2007, 04:50:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kjb0007

ok I have played with this until I am TOTALLY confused..lol. What I want to do is place an article on the front page (center) that all guests can see, which will be the only thing that guests can see. I placed the script in a center phpblock redirecting them to register after 2 views. When they register/login, that page changes to the actual main portal page). Can this be done?

Have I confused you too?  ;D

Zetan

Quoteok I have played with this until I am TOTALLY confused..lol. What I want to do is place an article on the front page (center) that all guests can see, which will be the only thing that guests can see.

Right...
umm.. Front Page Block, or Center Block?
errr.. Article or Block?

Quote
I placed the script in a center phpblock redirecting them to register after 2 views.

What script?

Quote
When they register/login, that page changes to the actual main portal page). Can this be done?

Probably..

Quote
Have I confused you too?

Yes.. You have!

Please read the posting guide.. I don't want to ask silly questions about how you've set your site up.


thanks  :)

kjb0007

#2
lol sorry.. I am tired (and still quite new to TP...)

I have turned off both sets of side blocks to guests. In the center I have a php block. In the php block I have the below script (set to 2 page views before it redirects guests to the registration page):

http://www.tinyportal.net/index.php?topic=10625.0 <---code snippet

What I would like is when guests view the site all they will see is one block (can be article, whatever) with whatever I put in it. (will probably be a statement about the site and welcoming guests). Once they have registered and logged in, I want it then to show the actual portal page I have set up for registered members to see.

The part that confused me is where you select an article to be the "feature". Setting the one I set up for guests, regular members will see as well when they are logged in.

What would be the best way to handle this?


Edit: Here is the link to my test site that I am using to get it set up the way I want before I set it up on my main forum:

http://kimmie.byethost13.com/index.php

The area that you can see is all I want guests to see. Then when a user is logged in, they will be able to see the actual portal page with different information in that area iinstead of the guest info (along with the side blocks).

Zetan

#3
So.. this is a question about the Block Code Snippet? Not sure why you didn't post in that topic...
I use this myself.

Forget the Article.. You are confusing the situation regarding Articles and Blocks.


Simply.. Put the script in a Center Block.
Set the limits.
Create a New Member Group.. call it, "Not Posted" or something.. set the group as a "Post count based group".
Also give the group minimal permissions.. IE; '0' Posts and change all other groups under "Post count based group"

to, Posts
Newbie 1
Next group 50
Next group 100
Next Group.. etc

All the instructions are in the topic to be honest.. I don't want to repeat what is written there  :)

You are tired and I'm not feeling great after a drink with friends.. actually.. Bleh!



You know.. I think I'm confusing this with the Welcome Notice snippet..  :idiot2:

kjb0007

its ok... I ended up just turning everyything off to guests all together. I hate doing that, but.....

Basically what I was looking for was to have two seperate front pages. One that guests see, and one that logged in members see <-----the main one

IchBin

You could use some PHP to do this:

if ($context['user']['is_logged'])
echo 'all your stuff for users here';

else
echo 'all your stuff for guests here';

kjb0007

ok I will try that... thanks :)

Zetan

But that doesn't do what Thurnoks snippet does, which is what your original post was about.

Redirect to Registration after a set amount of page views is what the snippet does and all of the instructions are in the topic.

I've not been well the last few days, so my brain is working at 1% of the 2% that it usually works at.

kjb0007

well I think I could have probably explained better in my original post what I was actually needing help with..that was my fault.. and I apolpgize. As for the code snippet, I mentioned that to kind of give you an idea of what I had done up to that point - I pretty much knew how that part worked and had it working to my specifications.

My overall intention was to have the two seperate pages as I mentioned here:

QuoteBasically what I was looking for was to have two seperate front pages. One that guests see, and one that logged in members see <-----the main one

Kind of giving guests an idea of what the site was all about, without actually letting them see the "real deal" so to speak. And once guests either tried to go to the forum area, or refresh, etc, "then" it would send them to the registration page.

I havent had a chance to try Ich's php idea yet, but I will probably in the next few days because I really hate turning the entire site off to guests. Thats not appealing to me when I go to someones forum, and I know its not appealing to alot of other people. In most cases, its usually a deterent and keeps me from actually signing up.  ;)

This website is proudly hosted on Crocweb Cloud Website Hosting.