Php href link question

Tbol

Member
Joined
Apr 7, 2019
Messages
45
Reaction score
6
Hi so im trying to create one function in website and im using href to link to a different php like this
href="..\quest\quest1.php">
so its inside www\quest\quest1.php it links just fine but it doesnt load template at all so i guess because this php have to be inside system folder but i cant understand those href if i want to link to \www\system\pages\quest\quest.php from \www\system\pages how href should look? Using myacc, im not sure about why it doesnt load template but i guess because it have to be inside system folder.
 

Discovery

Developing myself
Joined
Apr 16, 2010
Messages
388
Reaction score
88
Location
Neverland
I think the MyAAC exist a rewrite URL setting and some GETs inside the index.php to include some libraries/functions.php (db, wathever...)

You can't access directly the file by URL for example...
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
45
Reaction score
6
I think the MyAAC exist a rewrite URL setting and some GETs inside the index.php to include some libraries/functions.php (db, wathever...)

You can't access directly the file by URL for example...
Yea you might be right i guess i need to do something like this but not sure what is the right way of it.
PHP:
'/^account\/manage\/?$/' => array('subtopic' => 'accountmanagement'),
 

slawkens

Developer
Premium User
Joined
Aug 27, 2007
Messages
2,847
Reaction score
363
Location
Germany
You don't need to set that rewrite rules unless you have some specific requirements.

If you would like to create a custom page, you can either create it in Admin Panel - under "Pages", or directly in system/pages. Then you can access it using URL: http://your_host/?your_page_name (if you named the script your_page_name.php)
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
45
Reaction score
6
You don't need to set that rewrite rules unless you have some specific requirements.

If you would like to create a custom page, you can either create it in Admin Panel - under "Pages", or directly in system/pages. Then you can access it using URL: http://your_host/?your_page_name
Thats what i did which is just fine but there is inside page another page so that last page dont have template thats the problem basically My_Host/Page/AnotherPage
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
45
Reaction score
6
Thats what i did which is just fine but there is inside page another page so that last page dont have template thats the problem basically My_Host/Page/AnotherPage
bump
 

slawkens

Developer
Premium User
Joined
Aug 27, 2007
Messages
2,847
Reaction score
363
Location
Germany
I don't understand what are you trying to achieve. Can you provide a more detailed description?
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
45
Reaction score
6
I don't understand what are you trying to achieve. Can you provide a more detailed description?
Im trying to achieve inside page another page, basically this paint draw should be easy to understand
36229
The first part < works just fine it loads perfectly and etc but when i click on 'quest name 1' it opens new php but it doesnt load template.
 

slawkens

Developer
Premium User
Joined
Aug 27, 2007
Messages
2,847
Reaction score
363
Location
Germany
Then just use a different name for the page? I still don't understand :p You just create a new page like any other. Don't use slash "/" in your name cause it won't work.

Another solution would be to use JavaScript/jQuery instead to show the content of the "quest name 1" onClick and make it all in 1 page.
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
45
Reaction score
6
Then just use a different name for the page? I still don't understand :p You just create a new page like any other. Don't use slash "/" in your name cause it won't work.

Another solution would be to use JavaScript/jQuery instead to show the content of the "quest name 1" onClick and make it all in 1 page.
Fuck. So explain me why it doesnt load template. It should be really easy to understand example you go to www.test.com you click on first menu like lets say 'Quest' then it shows table you click on that table it drops you to another page this is where the problems appears (doesnt load template) it doesnt have slash in name. Quest.php (thats the main menu) quest1.php thats the second page it drops.
PHP:
 <TD><center>&nbsp;<a style="text-decoration: none" href="..\missions\quest1.php"><font color="white" size="2"><b>First Quest</b></font></a></center></TD>
 

Xikini

I whore myself out for likes
Premium User
Joined
Nov 17, 2010
Messages
4,042
Reaction score
2,114
Then just use a different name for the page? I still don't understand :p You just create a new page like any other. Don't use slash "/" in your name cause it won't work.

Another solution would be to use JavaScript/jQuery instead to show the content of the "quest name 1" onClick and make it all in 1 page.
I'm not well versed in this area, but I think I understand what he wants and what the problem is.

I'll use otland as the examples.
Code:
https://otland.net/ -- initial page
https://otland.net/forums/ -- quest page
https://otland.net/forums/support.16/ -- quest information page
When he goes from 'quest page' to 'quest information page' it doesn't load the main template. (background / sidebar)

-------------------------------------------------------------------------------------
Fuck. So explain me why it doesnt load template. It should be really easy to understand example you go to www.test.com you click on first menu like lets say 'Quest' then it shows table you click on that table it drops you to another page this is where the problems appears (doesnt load template) it doesnt have slash in name. Quest.php (thats the main menu) quest1.php thats the second page it drops.
PHP:
 <TD><center>&nbsp;<a style="text-decoration: none" href="..\missions\quest1.php"><font color="white" size="2"><b>First Quest</b></font></a></center></TD>
Woah. No need for the hostile wording.
The solution / workaround suggested above is maybe easier to see like this.
Code:
https://website.com/
https://website.com/questList/
https://website.com/questOne/
https://website.com/questTwo/
 

slawkens

Developer
Premium User
Joined
Aug 27, 2007
Messages
2,847
Reaction score
363
Location
Germany
As far as I understood he is trying to link a page that doesn't use MyAAC at all - it's plain PHP file. That's why it won't load the template.

Code:
href="..\missions\quest1.php"
With this declaration, you are omitting the AAC. You are just linking the file. You should just create a new page line @Xikini said, and paste your page there.
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
45
Reaction score
6
I'm not well versed in this area, but I think I understand what he wants and what the problem is.

I'll use otland as the examples.
Code:
https://otland.net/ -- initial page
https://otland.net/forums/ -- quest page
https://otland.net/forums/support.16/ -- quest information page
When he goes from 'quest page' to 'quest information page' it doesn't load the main template. (background / sidebar)

-------------------------------------------------------------------------------------

Woah. No need for the hostile wording.
The solution / workaround suggested above is maybe easier to see like this.
Code:
https://website.com/
https://website.com/questList/
https://website.com/questOne/
https://website.com/questTwo/
Yes exactly what i mean.
As far as I understood he is trying to link a page that doesn't use MyAAC at all - it's plain PHP file. That's why it won't load the template.

Code:
href="..\missions\quest1.php"
With this declaration, you are omitting the AAC. You are just linking the file. You should just create a new page line @Xikini said, and paste your page there.
So your solution is to create pages in admin panel? Which doesnt make sense to be honest or i dont know what you mean.
 

Aeluu

New Member
Joined
Apr 12, 2017
Messages
21
Reaction score
0
Location
Texas, USA
Since you're creating it purely with php, did you by any chance forget to add:
PHP:
<?php
include("ScriptWithTemplate.php");
?>
Else it won't know what it's looking for. However, most "WebPage.php" pages are written with HTML and not pure php..
 
OP
Tbol

Tbol

Member
Joined
Apr 7, 2019
Messages
45
Reaction score
6
Since you're creating it purely with php, did you by any chance forget to add:
PHP:
<?php
include("ScriptWithTemplate.php");
?>
Else it won't know what it's looking for. However, most "WebPage.php" pages are written with HTML and not pure php..
Yea i havent created <?php im not sure where do you want me to add it because in any condition it doesnt change anything.
 

Aeluu

New Member
Joined
Apr 12, 2017
Messages
21
Reaction score
0
Location
Texas, USA
If you could post the full length code, we can have a full picture of what's wrong. Otherwise, everything is a shot in the dark my friend.
 
Top