|
|
Due to the volume of spam happening on our forums, posting is now restricted to verified members only. If you're not verified, drop us a note with your username.
|
|
Home > FlexCMS Support Forum > Recent Messages
FlexCMS Support Forum
Recent Messages
|
|
|
|
Wow! | July 3, 2008 @ 11:18pm | David,
I'm so impressed! That did the trick!!! Man-o-man, how in the world did you figure that one out?!
Flex support rocks!
Thanks a bunch, Wolf
|
|
|
|
| |
|
|
|
|
| July 3, 2008 @ 10:50pm | Wolf,
That was a really weird one! You'll never guess what it was -- I sure wouldn't have!
And the winner is... two blank lines after the closing PHP tag ?> at the very end of the inc-na-idx.php file. Remove everything after the ?> at the bottom and you should be all set.
David |
|
|
|
| |
|
|
|
|
Almost there ... :-) | July 3, 2008 @ 8:47pm | Man, I love you guys! That did the trick with one exception and it's curious...
* I created a new menu block * Added your code (with my mods, shown) * Set access to GUEST * Enabled php * Saved it * Logged out * Directly accessed the different module pages
When I logout and try to go to module pages as Guest, I'm gracefully taken back to the home page... with the following exception - I'm still able to access the ARTICLES module pages (however, I do see an error that appears only when accessing ARTICLES as Guest)
This is the code I put into the module (I also added the store, register, and register-submit pages)
Code
if ($Arguments1 == 'articles' || $Arguments1 == 'calendar' || $Arguments1 == 'forum' || $Arguments1 == 'links' || $Arguments1 == 'newsletter' || $Arguments1 == 'photos' || $Arguments1 == 'register' || $Arguments1 == 'register-submit' || $Arguments1 == 'store') { header('Location: '.$MainURL.'/pages/index.html'); } |
|
When I go to an ARTICLES page, I see an actual article displayed, but I also see the following error message appear in the newly created menu-block:
Code
Warning: Cannot modify header information - headers already sent by (output started at /home/account-name/public_html/inc-na-idx.php:725) in /home/account-name/public_html/index.php(3292) : eval()'d code on line 2 |
|
Any suggestions as to how to fix it?
Thanks. Wolf
|
|
|
|
| |
|
|
|
|
| July 3, 2008 @ 7:16pm | Wolf,
Unfortunately you're correct, the notes you've made below are the way the various modules will behave in the current version. We'll definitely work towards making them more compatible with objectives such as yours in the next version.
For right now, you might be able to cheat it a bit and accomplish what you're looking for. Create a new block, set it to guests only, enable PHP, and add this code to it:
Code
if ($Arguments1 == 'calendar' || $Arguments1 == 'forum' || $Arguments1 == 'links' || $Arguments1 == 'articles' || $Arguments1 == 'photos' || $Arguments1 == 'newsletter') { header('Location: '.$MainURL.'/pages/index.html'); } |
| . You can modify it to suit, but essentially that will redirect anyone accessing the named areas back to the index page.
David |
|
|
|
| |
|
|
|
|
Accessing pages without being logged in | July 3, 2008 @ 4:49pm | I have a question about accessing INSTALLED MODULE pages when a user is not actually logged in.
This is what's going on...
I had initially setup a site with two menu structures. One for guests (non logged in user) which had links to Home, Calendar and Contact Us pages. Another for logged in members with all the usual module access links.
I noticed a lot of web crawler activity churning through calendar pages for the guest (non logged in user) pages. So, I decided to remove that link from the guest menu.
A couple days later I still notice crawler activity going through calendar pages as guest.
So, I make sure I'm logged out of the site, then manually typed the URL of different installed modules and I'm granted access to those pages without being logged in!
So I checked the following module pages without being logged in at all and these are my results:
http://www.mysite.com/index.php/calendar.html - allows access to calendar pages, events display according to access level
http://www.mysite.com/index.php/forum.html - shows blank forum page
http://www.mysite.com/index.php/links.html - allows complete access to all links
http://www.mysite.com/index.php/articles.html - allows complete access to articles
http://www.mysite.com/index.php/photos.html - shows message "No galleries currently exist, or none that your permissions allow you to access."
http://www.mysite.com/index.php/store.html - allows access to store pages up through the step 1 of 4 of the checkout pages
http://www.mysite.com/index.php/newsletter/messages/current.html - shows current newsletter page
http://www.mysite.com/index.php/newsletter/messages.html - shows archived newsletter message page
I'm using this as a subscription only membership site and want to disallow access to any pages that are above "guest level 0".
Is this possible without adding code to all of the installed module pages?
Thank you. Wolf
|
|
|
|
| |
|
|
|
|
| July 3, 2008 @ 4:27pm | Thanks David! That did the trick. |
|
|
|
| |
|
|
|
|
| July 3, 2008 @ 12:30pm | I moved it from a server running PLESK to another running PLESK |
|
|
|
| |
|
|
|
|
| July 3, 2008 @ 11:48am | Hello,
Yes, anything related to the connection to the database is located in the settings.php file. There's not much in there, just database server (usually localhost), username, password, database name, and table prefix if you'd like to use one.
Did you by chance move to a server running CPanel from one that wasn't, or the other way around? CPanel (and some others) require you to add your username to the database name, such as mysite_flexcms if your username was mysite and the database was flexcms, so that may need to be added or removed.
Short of that and any messing around you can do to try and figure out the correct settings, you should contact your host and confirm what the database settings should be.
David |
|
|
|
| |
|
|
|
|
looking for config file to edit | July 3, 2008 @ 7:53am | It has been a long, long time since I messed with any of these files. I recently moved a site using FlexCMS and there is only one little difference in db name and I'm looking for the config file so I can edit that locally. Right now I am getting cannot connect to the db. Any assistance in locating that file would be great. I see a settings.php file which looks like it is asking for the info I am using but I've plugged in the appropriate info to no avail. Wasn't sure if I was looking in the right place or not.
Thanks |
|
|
|
| |
|
|
|
|
| July 2, 2008 @ 4:34pm | Wolf,
Yes, that should be all you need. Both should be named "index" as you mentioned. Don't forget that they both need to be set to Enabled/Viewable. What might be happening is that the one you've got set to "Everyone" was created before the one set higher, so it's the one being displayed for everyone no matter what. You can try deleting that page and re-creating it to see if that does anything for you. The other option would just be to use the same page for both and add some PHP code such as
Code
if ($UserLevel == 0) { // guests stuff here } else { // basic member and above here } |
|
Also of note because I don't think it's really documented anywhere, is the order they're displayed in if they are named the same: Those with an End Date are displayed first, from soonest to latest, followed by any without an End Date. The reason it was done this way was so you could create a special page that would show for a week or however long, replacing the existing one during that time, and then reverting back to the existing one afterwards. This is great if you want to create a page for a sale or special event that needs to start and end in a certain range and then revert back to the standard one.
David |
|
|
|
|
|
|
| MEMBERS
|
|
|