Oct 08, 2008 | 05:03 PM  
Welcome

Don't have an account yet? You can create one, it is free, just click here

as a registered user you have some advantages like free downloads, comments and posting on our forums, depending upon this site's configuration and options.

 • •  Control Panel - Register - Login  • • 
Current Stable MDPro Lite 1.0821 Download
  Forum FAQForum FAQ   SearchSearch  UsergroupsUsergroups  PreferencesPreferences  Options forumOptions forum  Watched TopicsWatched Topics  Watched ForumsWatched Forums
Latest forum posts Latest forum posts  Log in to check your private messages Log in to check your private messages    Log inLog in 
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
data_art
MD user level 5
MD user level 5


Joined: June 27, 2004
Posts: 58

Member
Post  Posted: Sep 20, 2005 - 06:18 AM Reply with quote Back to top

Yes! I finally got the template module to work for me - now for the task of understanding it...

Although I'm quite familiar with the PHP Syntax I see in PHP books, the code in this module is far more Object-Oriented than what I normally see. It appears that all of the code displayed results from implementations of the pnHTML class.

So, at least two things are going on here: implementations of the pnHTML class are being used for the display of output, and the pnAPI is being used for database access/security/core MD-Pro functions. I don't see the places for custom uses of the API yet...still working on it.
View user's profile Visit poster's website Yahoo Messenger
Lobos
MD user level 3
MD user level 3


Joined: Sep 22, 2003
Posts: 37

bannato
Post  Posted: Sep 21, 2005 - 07:24 AM Reply with quote Back to top

Hey man, did you try that module I made? It uses html templating instead of pnHTML - have a play with it and you will soon understand what is going on...
View user's profile
dmiranda
MD Staff
MD Staff


Joined: Dec 07, 2003
Posts: 770
Location: Kenya
bannato
Post  Posted: Sep 21, 2005 - 07:39 AM Reply with quote Back to top

May be good to put a news in the frontpage.

_________________
We know what you are missing
http://www.hmtraveller.com
View user's profile Visit poster's website
Lobos
MD user level 3
MD user level 3


Joined: Sep 22, 2003
Posts: 37

bannato
Post  Posted: Sep 22, 2005 - 02:41 PM Reply with quote Back to top

Yes I did put the news as soon as I finished it, but it got lost - Max found it and posted though so it is there now.

-Lobos
View user's profile
dmiranda
MD Staff
MD Staff


Joined: Dec 07, 2003
Posts: 770
Location: Kenya
bannato
Post  Posted: Sep 22, 2005 - 04:00 PM Reply with quote Back to top

There now Smile

_________________
We know what you are missing
http://www.hmtraveller.com
View user's profile Visit poster's website
data_art
MD user level 5
MD user level 5


Joined: June 27, 2004
Posts: 58

bannato
Post  Posted: Sep 23, 2005 - 02:09 AM Reply with quote Back to top
Post subject: Lobos!

I'm running into a bit of trouble with your module:

http://dougfranklin.com/index.php?module=nvRender&func=main
View user's profile Visit poster's website Yahoo Messenger
PeteBest
MD user level 5
MD user level 5


Joined: Oct 06, 2003
Posts: 4845

bannato
Post  Posted: Sep 23, 2005 - 04:16 AM Reply with quote Back to top

I don't think nvRender has any function for users. It's just a module generator and SmartyLite distribution, so only admin users need to be able to access it

_________________
Retired from official MAXdev duties
View user's profile
data_art
MD user level 5
MD user level 5


Joined: June 27, 2004
Posts: 58

bannato
Post  Posted: Sep 23, 2005 - 04:22 AM Reply with quote Back to top
Post subject: Aahh...

Sad

I get the same result as an admin.
View user's profile Visit poster's website Yahoo Messenger
PeteBest
MD user level 5
MD user level 5


Joined: Oct 06, 2003
Posts: 4845

bannato
Post  Posted: Sep 23, 2005 - 04:28 AM Reply with quote Back to top

Check to make sure you uploaded it correctly. From the error above it looks like it can't find or access modules/nvRender/pnlibrary/smarty_lite/class.template.php may be exactly the same problem file with the admin area as well then


I've tested it with MD-Pro 1.0.74 and not experienced any problems

_________________
Retired from official MAXdev duties
View user's profile
data_art
MD user level 5
MD user level 5


Joined: June 27, 2004
Posts: 58

bannato
Post  Posted: Sep 24, 2005 - 02:10 AM Reply with quote Back to top
Post subject: Thanks LOBOS!!

This module now works. It's AWESOME. My mind is spinning as I contemplate the potential.
View user's profile Visit poster's website Yahoo Messenger
Lobos
MD user level 3
MD user level 3


Joined: Sep 22, 2003
Posts: 37

bannato
Post  Posted: Sep 25, 2005 - 03:08 AM Reply with quote Back to top

@data_art, Glad you like it - it was made special for people like you, ie those that can do some php, but haven't got the time to learn the intricacies of getting a module to install, etc, etc. Man it took me so much trial and error just to understand how pnAPI compliant modules work... be glad that you don't have to go through this process too LOL

@Pete, thanks for testing - I haven't had much feedback on the mod, so I am hoping it works as it is supposed to - have you encountered any problems, any suggestions on how it could be better? This goes for you as well, @data_art - feel free to make some suggestions!

-Lobos
View user's profile
data_art
MD user level 5
MD user level 5


Joined: June 27, 2004
Posts: 58

bannato
Post  Posted: Sep 27, 2005 - 02:18 AM Reply with quote Back to top
Post subject: PHP Classes

Lobos -

Do I apply my php classes to the template? For example:

class grid($rows, $cols) {

var $r = $rows;
$c = $cols;

function grid_function() {
// this is one of the grid functions
for($a; $a<($r+1); $a++) {
echo "<td>$a</td>";
}
}
return grid_function(return_value);
}
View user's profile Visit poster's website Yahoo Messenger
data_art
MD user level 5
MD user level 5


Joined: June 27, 2004
Posts: 58

bannato
Post  Posted: Sep 28, 2005 - 03:54 AM Reply with quote Back to top
Post subject: LOBOS! I'm SO CLOSE!!

pnuserapi.php:

I added this function:
for($a=1; $a<9; $a++) {
$amortization = array($a => array('month' => $a, 'calculation' =>'123-1234')));
}

However, only $amortization[8] shows up on the output. How do I get this for loop (the iterated contents of the $amortization array) to show up on the output?

http://dougfranklin.com/index.php?module=DougModule2&func=main
View user's profile Visit poster's website Yahoo Messenger
data_art
MD user level 5
MD user level 5


Joined: June 27, 2004
Posts: 58

bannato
Post  Posted: Oct 01, 2005 - 02:06 AM Reply with quote Back to top
Post subject: Lobos' Module that makes modules...

At first, I was skeptical. "Why would I want someone else's prefab module that doesn't necessarily do what I want?", I thought. Wow...was I wrong. This module is truly awesome.

Lobos, may I contribute to the documentation?
View user's profile Visit poster's website Yahoo Messenger
fabien
MD user level 1
MD user level 1


Joined: Sep 16, 2005
Posts: 13
Location: Shanghai
bannato
Post  Posted: Oct 04, 2005 - 06:26 PM Reply with quote Back to top

Ok...
I'm nearly done with writting requirements so I have started to check on the technical part, that is to say MD-Pro module building.
To say it simply, for someone who does not come from the CMS world it is a bit hard.

What I understood is :
MD-Pro is a CMS. The goal of CMS is to build a common infrastructure to build on top of it in order to mainly share the same visual interface, share user database and other properties/behavior.
In order to do so people who want to build modules (additionnal CMS functionnalities) use functions from the API to properly interact with the "core", they can also use API functions for utility purpose.
In order to separate presentation from business logic the CMS use a template system. Templates embed business logic results inside of presentation code. Thanks to this layer the site can have a common presentation.


First question of course : Did I get it right ?
Then : What does the core really provide outside of user management ? (I didn't found any schema explaining that)
How to properly interact with the core ? (I think here also a nice schema with step by step interaction, like handshaking procedure, could REALLY help)
Why is there so many templating system out there ? Why don't we use XML/XSLT ? I mean regarding templating XSLT looks really powerful and adapted for me.
Is it a good idea to build the tables, business logic, etc... without thinking at all about MD-Pro then integrate this as a module later ? (if everything is done properly, meaning clean functions/class separation)


By the way I tried to play with Lobos nvRender module but I got this error :
Fatal error: TPL: [in line 0]: syntax error: file 'user_main.htm' does not exist in /hsphere/local/home/shanghai/shanghaiexpat.net/modules/nvRender/pnlibr ary/smarty_lite/class.template.php on line 457
I checked my ftp log and every files are there. I installed the module and everything went smoothly.
I am trying to acess it through http://shanghaiexpat.net/admin.php?module=nvRender
I tryed to check the module docs but all I could found was Smarty-light docs.
Also, do I need to use Smarty-light to "enjoy" nvRender or could I use something else like Bender (I don't really know why I should use this template thing instead of this one but it looks like my boss prefer this one...).

Ok so I think I cover a bit of everything here. Please DO answer with RTFM if the answer is in there but just point me to the right direction (i.e. use a link).
I understand if it's crystal clear for you but for a newcomer I have to say it's a bit messy Silenced
View user's profile Visit poster's website MSN Messenger
Display posts from previous:     
Jump to:  
All times are GMT + 13 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by MDForum 2.0.8© 2003-2007 MAXdev Team
Credits