Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Is there a Wiki? Create extra pages?

  1. #11
    Join Date
    Apr 2007
    Posts
    2,202

    Default Re: Is there a Wiki? Create extra pages?

    What is the url where you get 404 error ?

  2. #12
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: Is there a Wiki? Create extra pages?

    w00t I figured it out...it was the call to the sql query for the page that was screwing it up.

    This is what worked:


    Code:
    require './include/config.php';
    if ($page_info['page_members_only'] == 1)
    {
        User::is_logged_in();
    }
    
    function show_page_not_found()
    {
        header("HTTP/1.0 404 Not Found");
        echo "<html><head><title>Page Not Found</title></head><body>Page Not Found</body></html>";
        exit(0);
    }
    
    $smarty->assign('err', $err);
    $smarty->display('header.tpl');
    $smarty->display('mypage.tpl');
    $smarty->display('footer.tpl');
    db_close();
    If it's not fun, stop doing it!

  3. #13
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: Is there a Wiki? Create extra pages?

    There must be another way of doing this...I need some pages to be members only and some open to the public. Anytime I have the sql call in the beginning, I get "page not found"

    If I have this, then the page is viewable by everyone. Another problem is that my php code on those special pages require information from the database and that information is not displaying.

    Code:
    require './include/config.php';
    
    if ($page_info['page_members_only'] == 1)
    {
        User::is_logged_in();
    }
    
    function show_page_not_found()
    {
        header("HTTP/1.0 404 Not Found");
        echo "<html><head><title>Page Not Found</title></head><body>Page Not Found</body></html>";
        exit(0);
    }
    If it's not fun, stop doing it!

  4. #14
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: Is there a Wiki? Create extra pages?

    in vshare2.6, we used to do somethin glike this and it would work, but doesn't with 2.7---the information from the database is not displayed in 2.7 and I'm using the same database script as I did with 2.6, other than changing the name of the database tables for 2.7 and using the new "include" codes posted earlier.

    Code:
    <?php
    session_start();
    require("include/config.php");
    require("include/function.php");
        
    	if (!isset($_SESSION['USERNAME'])) {
           Header("Location: {$config['baseurl']}/login.php");
                exit(0);
        }
    STemplate::assign('err',$err);
    STemplate::assign('msg',$msg);
    STemplate::display('../templates/header.tpl');
    STemplate::display('../templates/error.tpl');
    
    ==MY WHOLE BUNCH OF PHP CODE INCLUDING DATABASE QUERIES BLAH BLAH BLAH===
    
    STemplate::display('../templates/footer.tpl');
    
    db_close(); ?>
    If it's not fun, stop doing it!

  5. #15
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: Is there a Wiki? Create extra pages?

    This is what I have in my mypage.php and it's not displaying the database information and I'm using the identical script that I was using in 2.6 (only change is the names of the tables). The page displays, the header and footer is all there..but the content is blank...no information is being shown from the database. The header for the <table> and the <td> cells show up, so I know all that's working but the information that's supposed to be in it is not there and I'm not getting a database error...I just can't figure out why the information won't display and how to get it for member only.

    Code:
    <?php
    session_start();
    require("include/config.php");
        
    	if (!isset($_SESSION['USERNAME'])) {
           Header("Location: {$config['baseurl']}/login.php");
                exit(0);
        }
    $smarty->assign('err',$err);
    $smarty->assign('msg',$msg);
    $smarty->display('header.tpl');
    $smarty->display('error.tpl');
    
    ===============MY PHP SCRIPT HERE WHERE IT SHOULD DISPLAY DATABASE INFORMATION================
    
    $smarty->display('footer.tpl');
    
    db_close();
    If it's not fun, stop doing it!

  6. #16
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: Is there a Wiki? Create extra pages?

    Here's what I got so far....the code I just posted above DOES work to make it member only...it's just not displaying the information from the database.
    If it's not fun, stop doing it!

  7. #17
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default

    I got my problem sorted out. I used an example from another page to accomplish what I needed to accomplish, however, I'm going to miss the old way of doing it.
    If it's not fun, stop doing it!

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Create Thumbnail - START
    By admin in forum Frequently Asked Questions
    Replies: 6
    Last Post: 10-07-2008, 01:07 PM
  2. Adding Extra Servers
    By topfreaks in forum Installation Support
    Replies: 0
    Last Post: 06-30-2008, 08:18 PM
  3. How can we create members only pages outside ACP?
    By grynmoors in forum Template Modifications
    Replies: 4
    Last Post: 05-06-2008, 11:27 AM
  4. How create new field on database
    By pachouille in forum Template Modifications
    Replies: 2
    Last Post: 02-17-2008, 02:31 PM
  5. Extra Data fields in video upload and user profiles
    By dancairns in forum Template Modifications
    Replies: 0
    Last Post: 10-16-2007, 11:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •