Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
List Viewer not showing up...

 

 


nikkijones
User

Feb 18, 2008, 3:31 PM

Post #1 of 7 (658 views)
Shortcut
List Viewer not showing up... Can't Post

Hi.

I've created a list viewer for a schools list using CMS Builder. The list for some reason, is appearing on one page and not on the other, eg:

http://www.interiorcentral.tv/AIP/schoolsmainPage.php - the schools list appears on the left

http://www.interiorcentral.tv/AIP/schoolsPage.php?1._Arrow_Vale_High_School-3 - the school list DOESN'T appear on the left.

I have the code 'include "schoolsList.php";' used on both.

Also, we wanted to have a password protected page for each school. This seemed simple in theory, the host provides password protected pages as part of its package. However, as the page is not a fixed page, is it impossible to password protect each page? The site had the whole are password protected before, however we now want each school password protected and i may have to re-do the whole school area if i cannot find a solution Mad Any ideas? I've searched the net but just keep getting normal php password scripts, not a script for when a specific page is called.

Any help would be fab as its driving me crazy Crazy

Cheers,
Nikki Smile


Dave
Staff / Moderator


Feb 18, 2008, 8:21 PM

Post #2 of 7 (654 views)
Shortcut
Re: [nikkijones] List Viewer not showing up... [In reply to] Can't Post

>The list for some reason, is appearing on one page and not on the other.

The default for lists is to load the page number from the end of the url. So with the second url it's trying to show your 'page 3' of the results, which doesn't exist.

Try hard coding the page number for the school list to be 1 like this: $options['pageNum'] = '1';

>Also, we wanted to have a password protected page for each school.

I have a few ideas for this. So you want schoolsmainPage.php to be public and schoolsPage.php to be password protected? Or is this for a different section all together? Will each school have it's own password? What should happen if they don't know the password? Would it be better to have a username/password popup or a special url with a password on the end in it?

Let me know and I'll work on some options for you.

Dave Edis - Senior Developer
interactivetools.com


nikkijones
User

Feb 27, 2008, 3:16 PM

Post #3 of 7 (583 views)
Shortcut
Re: [Dave] List Viewer not showing up... [In reply to] Can't Post

Hi Dave,

Thanks for pointing out that Dave, it sorted out the problem.

Regarding the password protect, yes that's exactly what i want. Nothing too fancy. Schools are allocated a specific password and they need to type that in to get their schools details. If they forget it, they contact the client (as they contact regularly). Not bothered also whether it pops up or not. I was in a rush so i purchased a password protect script, however each school can still get in with the same password. We need each school to have their own unique password. Does this make sense?

Thanks as always for your help

NikkiSmile


Dave
Staff / Moderator


Feb 27, 2008, 5:45 PM

Post #4 of 7 (578 views)
Shortcut
Re: [nikkijones] List Viewer not showing up... [In reply to] Can't Post

Would it be possible to just add a field to the school section editor called password? And then maybe have a pulldown with the school names and a field for password.

Then do a list viewer that only shows one record and matches records with that school name and password?

What do you think?

Dave Edis - Senior Developer
interactivetools.com


nikkijones
User

Feb 28, 2008, 1:04 PM

Post #5 of 7 (562 views)
Shortcut
Re: [Dave] List Viewer not showing up... [In reply to] Can't Post

Hi Dave,

I think i know what you're saying. The things is, i've set up the schools list as a viewer so the client can add news schools on and write all about them. This seemed the easiest way to do this - is there not a way to password protect it this way? With a pull down, how would the client be able to populate the list with schools?

Or am i completeley misunderstanding what you've said? Crazy

Cheers,
Nikki.


Dave
Staff / Moderator


Feb 28, 2008, 2:02 PM

Post #6 of 7 (558 views)
Shortcut
Re: [nikkijones] List Viewer not showing up... [In reply to] Can't Post

Instead of having the list viewer output an html list of schools, you just have it output a list of schools with <option></option> around each school. Does that make sense?

But I had another idea all together for this. Is it important to have a direct url? Like school.php?OurSchool or can they always just link to the main page? Because if they can link to the mainpage you could just lookup the schools by password alone (making password a required, and unique field in the editor).

If you wanted to try that, create a new list viewer called schoolsPage2.php.

Then add this to the top in the HTML <head></head>.


Code
<?php if (!$_GET['password']) { die("No password specified!"); } ?>


Then on your schoolList.php page add this javascript to the top:


Code
<script type="text/javascript"><!-- 
function getPasswordAndRedirect() {
var password = prompt('Enter Password', '');

if (password) {
window.location='schoolPage2.php?password=' + password;
}

return false;
}
// --></script>


and replace your school links with this:


Code
<a href="#" onclick="getPasswordAndRedirect();">...</a>


Then when they click on a school they'll get prompted for a password and then redirect to an url such as: schoolsPage2.php?password=magic which will display the school with that password -or- the "no records found" message, which you could replace with "Invalid Password".

What do you think? Would that work for you? Hopefully I didn't make that too complicated. :)

Dave Edis - Senior Developer
interactivetools.com


nikkijones
User

Feb 28, 2008, 2:13 PM

Post #7 of 7 (557 views)
Shortcut
Re: [Dave] List Viewer not showing up... [In reply to] Can't Post

Ooooh - that sounds like a better option! Thanks Dave, i will look into it and let you know how i get on Smile

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4