Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: What's the quickest way to create a new page?

  1. #1
    hacker
    Guest

    Default What's the quickest way to create a new page?

    Let's say for this example just a blank page (I'll fill it up later) but the user properties are passed on (based on membership) ....

  2. #2
    lodlock's Avatar
    Join Date
    May 2006
    Posts
    284

    Default

    You could easily enough copy one of the little pages like the faq.php and clear out all of the PageComp stuff. Then copy the member checks from one of the other main pages such as member.php or profile.php.
    -Lodlock

  3. #3
    N9neBlood
    Guest

    Default

    How can I change this variable
    PHP Code:
    $_page['name_index']     = 13
    so that is points to a file in a different directory?

    Thanks in advance

  4. #4
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    you can change the 13 to 333 or something, then copy the default template to the 333 template - and edit that as needed. (its a bit more involved than that with some special pages that dont use the default template and have their own, like the index.php page)

    It will allow you to call a different template for the page... but not really a different directory... since the temp directory is coded into different function, to choose the directory based on your selected template.

    Now - you could work with that function, and if the called template is 333, have the function get it from someplace else.

    But, just changing the value from 13 to 333 is not going to do that.

    Sorry if my reply is confusing.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  5. #5

    Join Date
    Sep 2006
    Posts
    431

    Default

    I am sorry for this embarrasing question

    What is $_page['name_index'] = 13;


    I am assuming this code calls the index page? What does the 13 signify? And by changing 13 to 333 what exactly would that do?

    I took a quick look through my root and template folders. I see page_1.html and plenty others, but I don't see 13, so I must not be understanding this correctly.
    Anyone who has a banana can eat it!

    From 0 to 6.0 in 3.5

  6. #6
    zman
    Guest

    Default

    There are no embarrassing questions. Or do I mean there are no stupid questions? (Or maybe that was a stupid question).

    I believe "$_page['name_index'] = 13;" would refer to page_13.html. You probably don't have a page_13 because this was a new page that N9neblood was creating. At least that's the way I understand this thread.

  7. #7
    N9neBlood
    Guest

    Default

    $_page['name_index'] = 13; Refers to the corresponding name in the tmpl files eg page_6 = the page template for member.php.

    When adding more pages using the template I created a php file in the trunk called mynewpage.php into which I copied faq.php and changed $_page['name_index'] = 13; to $_page['name_index'] = mynewpage; then created a page within the tmpl files called page_mynewpage.html So when you type www.yoursite.com/mynewpage.php you should get the contents of your new page within your design template. Hope I've made sense.
    Last edited by N9neBlood; 02-13-2007 at 09:40 AM.

  8. #8

    Join Date
    Sep 2006
    Posts
    431

    Default

    Thank you ! That is clear, and gives me a much needed explanation.

    Now, for my next step/question:

    I create a folder in the root called "my_dir", and inside this folder there is another folder called 'templates" It is there, in templates that a file named main.html is something that I want to incorporate on a new page in my site.

    So, in my root folder, I will create a file: mydir.php, which in essence will be a copy of faqs.php.

    In mydir.php I will change $_page['name_index'] = 13 to
    $_page['name_index'] = 155

    Then, in my tpl files, I will create a file page_155

    Now, when ever anyone goes to mysite.com/mydir.php it will have the header and footer of my site, but populate with page_155 ??

    Here comes the trick - How do I populate page_155 with root/my_dir/templates/main.html?

    copying/paste does not seem to work correctly. Only the static text carries over, but anything that was dynamic variable, does not show.



    Quote Originally Posted by N9neBlood
    $_page['name_index'] = 13; Refers to the corresponding name in the tmpl files eg page_6 = the page template for member.php.

    When adding more pages using the template I created a php file in the trunk called mynewpage.php into which I copied faq.php and changed $_page['name_index'] = 13; to $_page['name_index'] = mynewpage; then created a page within the tmpl files called page_mynewpage.html So when you type www.yoursite.com/mynewpage.php you should get the contents of your new page within your design template. Hope I've made sense.
    Anyone who has a banana can eat it!

    From 0 to 6.0 in 3.5

  9. #9

    Join Date
    Sep 2006
    Posts
    431

    Default

    To possibly clarify what exactly I am trying to do, is install a search directory on my site.

    This one, in particular:
    http://www.onlinemarketingtoday.com/...nk-management/...
    Anyone who has a banana can eat it!

    From 0 to 6.0 in 3.5

  10. #10
    zman
    Guest

    Default

    Quote Originally Posted by Ringodestarr
    copying/paste does not seem to work correctly. Only the static text carries over, but anything that was dynamic variable, does not show.
    Do you mean you have copied the contents of main.html and pasted it into page_155.html, and it doesn't work properly? In that case, I would try making the variables global, or 'include' the files containing the variables into your new file mydir.php.

    But then again I'll try anything, so to save you wasting time you may want to wait till somebody with some knowledge of php can confirm or deny this.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. database table ProfileDesc to create a NEW page
    By Diddy in forum Dolphin General Discussion v6.00 and above
    Replies: 2
    Last Post: 07-12-2008, 08:06 PM
  2. Replies: 5
    Last Post: 04-05-2007, 11:45 AM
  3. Does anyone know how to create
    By delirious in forum Language Files / Language Database
    Replies: 1
    Last Post: 11-17-2006, 12:58 AM
  4. create new page that calls another PHP w/ require statement?
    By archinects in forum General Troubleshooting
    Replies: 11
    Last Post: 07-04-2005, 09:51 AM
  5. create new site
    By Jack Kubel in forum General Troubleshooting
    Replies: 1
    Last Post: 06-28-2005, 04:07 AM

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
  •