TutorialMS Community Forum

Full Version: Change the read_tutorial.php name
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can I change the name of read_tutorial.php to view.php and the script still work?
Save your "read_tutorial.php" as "view.php" so you don't lose your original. Then edit the new from:
Code:
$read_tutorial_page = 1;
to:
Code:
$view_page = 1;

Next, in global.php about halfway down change:
Code:
// the $read_tutorial array
    $read_tutorial = array();
    global $read_tutorial_page;
    if($read_tutorial_page == 1) {
to:
Code:
// the $read_tutorial array
    $read_tutorial = array();
    global $view_page;
    if($view_page == 1) {

Try it and see - if it doesn't work just reverse the changes in global.php

Hope this helps.
I followed this to the T and it did not work :oops:
I missed a section in "global.php", just a bit farther down from the other edit. Find:
Code:
if(MOD_REWRITE_ON == 1) {
            $read_tutorial['nav_link'] = HTTP_SERVER.'read_tutorial/'.$id.'/';
            $read_tutorial['nav_querystring'] = '';
        }else{
            $read_tutorial['nav_link'] = HTTP_SERVER.'read_tutorial.php?';
            $read_tutorial['nav_querystring'] = 'id='.$id;
        }
and change to:
Code:
if(MOD_REWRITE_ON == 1) {
            $read_tutorial['nav_link'] = HTTP_SERVER.'view/'.$id.'/';
            $read_tutorial['nav_querystring'] = '';
        }else{
            $read_tutorial['nav_link'] = HTTP_SERVER.'view.php?';
            $read_tutorial['nav_querystring'] = 'id='.$id;
        }
I missed that part and just found it now. Try this with the previous edits and see how it works.
Will try now thanks!
Didnt work. I found this bit in the code in global.php

Code:
    }else{
            $read_tutorial['nav_link'] = HTTP_SERVER.'read_tutorial.php?';
            $read_tutorial['nav_querystring'] = 'id='.$id;

Am I supposed to change anything that says read_tutorial?
That was one of the parts to change:
Code:
}else{
         $read_tutorial['nav_link'] = HTTP_SERVER.'read_tutorial.php?';
         $read_tutorial['nav_querystring'] = 'id='.$id;
change to:
Code:
}else{
         $read_tutorial['nav_link'] = HTTP_SERVER.'view.php?';
         $read_tutorial['nav_querystring'] = 'id='.$id;

I didn't think all the read_tutorial's need to be changed - just the page references
Yeah it still will not work even after changing the php file name.
Reference URL's