Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2011-05-19 11:16:11

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

new pages add

maybe posted again but have many topic here and i dont have time to look up.

how i can i add new page??

Offline

#2 2011-05-19 12:11:50

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: new pages add


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2011-05-19 13:12:15

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: new pages add

i try but i get white page.

http://www.xporn4u.com/helloworld/

what i done rong?

Offline

#4 2011-05-19 13:57:36

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: new pages add

I do not know. I need to see the code. If you want a simple http://www.domain.com/static/xxx/ static page, you can just use Admin -> Content. If you create a module, you need to follow the instructions in the HOWTO and it will work.

Please tell me the exact steps you've done to get the helloworld page.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#5 2011-05-19 14:49:55

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: new pages add

i create static page its ok

http://www.xporn4u.com/static/contact/

but its same for module to???
i do anything say here

http://forum.adultscriptpro.com/viewtopic.php?id=167

Offline

#6 2011-05-19 16:22:02

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: new pages add

Its not the same for a module. Its a more complicated process (its intended for a developer, but i'll add some more features in admin to create modules easily). Hmm...did you enable your module from the admin panel after adding the mysql row? (Admin -> Extend -> Module Manager)?


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#7 2011-05-19 17:40:13

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: new pages add

yes its enable.

Offline

#8 2011-05-19 19:39:43

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: new pages add

Hmm...go to Admin -> Config and enable debug and after that access the same page again. Do any errors appear on the screen? If yes, please paste them here...if not...i'll have to check via FTP/ssh (i think i have your credentials).


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#9 2011-05-19 19:58:15

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: new pages add

Parse error: syntax error, unexpected T_VARIABLE in /home/xporn4u/public_html/modules/helloworld/helloworld.php on line 16

Fatal error: Exception thrown without a stack frame in Unknown on line 0

Offline

#10 2011-05-20 09:09:10

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: new pages add

Paste the module code here (all the code).


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#11 2011-05-20 13:02:10

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: new pages add

you say to add


modules/module-name/
modules/module-name/components/
modules/module-name/components/component-name.php
modules/module-name/helpers/
modules/module-name/module-name.php
templates/your-template/module-name.tpl.php
templates/your-template/module-name_component-name.tpl.php

i have


modules/helloworld/
modules/helloworld/components/
modules/helloworld/components/helloworld.php
modules/helloworld/helpers/
modules/helloworld/helloworld.php
templates/default-pink/helloworld.tpl.php
templates/default-pink/helloworld_helloworld.tpl.php

in this file


modules/helloworld/components/helloworld.php

i dont have nothing....is empty becuse here is not say something to add  ( http://forum.adultscriptpro.com/viewtopic.php?id=167 )


here i have

modules/helloworld/helloworld.php

<?php
defined('_VALID') or die('Restricted Access!');
class VModule_helloworld
{
    public function __construct()
    {
    }

    public function render()
    {
        // code here (if you want your module to do anything else except displaying the template)     

        $tpl = VF::factory('template');
        $tpl->menu        = 'helloword'; // useful if you want the menu item for this module to be highlighted
        $tpl->title           = 'Title for this module will go here' // useful if you want your page to have a different title
        $tpl->meta_desc = 'Meta Description for this module will go here' // useful if you want your page to have a different meta description
        $tpl->meta_keys = 'Meta Keywords for this module will go here' // useful if you want your page to have different meta keywords
        $tpl->css            = array('url' => '/absolute/path/to/a/css/file.css'); // only useful if you want to load a separate css file for this module
        $tpl->js               = array('url' => '/absolute/path/to/a/js/file.js') // only useful if you want to load a separate js file for this module
        $tpl->load(array('header', 'helloworld', 'footer'));
        $tpl->display();
    }
}
?>

here i have...

templates/default-pink/helloworld.tpl.php

<?php defined('_VALID') or die('Restricted Access!'); ?>
<div id="page">
// here you can add anything you want (html/php)
</div>


and this empty to

templates/default-pink/helloworld_helloworld.tpl.php

Offline

#12 2011-05-20 15:16:27

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: new pages add

Erm...its a error, add ; after each line with $tpl that doesnt already have ; (basically the last character should be wink.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#13 2011-05-20 16:00:42

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: new pages add

im sorry i dont understund sad

Offline

#14 2011-05-20 17:51:37

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: new pages add

Replace:

public function render()
    {
        // code here (if you want your module to do anything else except displaying the template)     

        $tpl = VF::factory('template');
        $tpl->menu        = 'helloword'; // useful if you want the menu item for this module to be highlighted
        $tpl->title           = 'Title for this module will go here' // useful if you want your page to have a different title
        $tpl->meta_desc = 'Meta Description for this module will go here' // useful if you want your page to have a different meta description
        $tpl->meta_keys = 'Meta Keywords for this module will go here' // useful if you want your page to have different meta keywords
        $tpl->css            = array('url' => '/absolute/path/to/a/css/file.css'); // only useful if you want to load a separate css file for this module
        $tpl->js               = array('url' => '/absolute/path/to/a/js/file.js') // only useful if you want to load a separate js file for this module
        $tpl->load(array('header', 'helloworld', 'footer'));
        $tpl->display();
    }

with:

public function render()
    {
        // code here (if you want your module to do anything else except displaying the template)     

        $tpl = VF::factory('template');
        $tpl->menu        = 'helloword'; // useful if you want the menu item for this module to be highlighted
        $tpl->title           = 'Title for this module will go here'; // useful if you want your page to have a different title
        $tpl->meta_desc = 'Meta Description for this module will go here'; // useful if you want your page to have a different meta description
        $tpl->meta_keys = 'Meta Keywords for this module will go here'; // useful if you want your page to have different meta keywords
        $tpl->css            = array('url' => '/absolute/path/to/a/css/file.css'); // only useful if you want to load a separate css file for this module
        $tpl->js               = array('url' => '/absolute/path/to/a/js/file.js'); // only useful if you want to load a separate js file for this module
        $tpl->load(array('header', 'helloworld', 'footer'));
        $tpl->display();
    }

Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#15 2011-05-20 21:21:31

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: new pages add

ok this work thank you

Offline

Board footer

Powered by FluxBB