xoops forums

Forum Index


Board index » All Posts (birdseed)




birdseed

Just popping in
Posted on: 2006/7/10 14:18
birdseed
birdseed (Show more)
Just popping in
Posts: 59
Since: 2005/2/26
#21

Re: Module development - AddElement

Hi McNaz,

Quote:

Sorry but I have to disagree there. Especially the bit about "good style to get HTML out of the php files". It might have been good style ten years ago but we've (thankfully) moved on from the stone ages of PHP and HTML in one file.


Even today many PHP Newbie Tutorials use that approach and xoops1 still used it. Even in xoops2...have a look at the implementation of the comment system and tell me if this is how it should be.

I think we both want the same result. Well structured code. What I criticised in your post is that you see it too dogmatic by not using the XoopsForms because it would injure the MVC principle.
First, the basic MVC Approach is originally aimed at fat clients. In Web application, you can't adopt that at 100%, you can just do "something that looks like MVC".
Second, it isn't even said that XoopsForm injures the MVC principle. Prove it to me. ;)

In ASP.NET, you have something which is calles SqlDataSource. SQL Statements directly in the HTML Code! Ugly, you would think. But: The idea is from .NET 2.0 (2005 and not 1995) and it makes code development much faster for smaller applications. Although it hurts almost every principle of structured code. No matter, it works fine.

Quote:

I would imagine that Smarty templates consume less overhead due to the fact that Smarty caches and compiles php files. You also get the added bonus of not having HTML strewn all over your PHP file .


Ever had a look at a compiled result of a <{section}> Tag? Ever went into a function call of a runtime plugin with a debugger? Ever stepped though the instanciation process of a smarty template? The IS much overhead. Even with the compilation result.

greetings
birdseed


birdseed

Just popping in
Posted on: 2006/7/10 13:59
birdseed
birdseed (Show more)
Just popping in
Posts: 59
Since: 2005/2/26
#22

Re: core 2.2.4: token system annoying

Hi

you haven't read my posting attentively. XOOPS security disallows the repeated sending of POST requests.

greets
bsm


birdseed

Just popping in
Posted on: 2006/7/10 9:45
birdseed
birdseed (Show more)
Just popping in
Posts: 59
Since: 2005/2/26
#23

Re: Module development - AddElement

Hi

If you just want a simple answer form, use liaise or other modules. But you said you want to do your own module which looks like you have some custom stuff to do. So use Xoopsforms for that.

If you need highly flexible forms (e.g. with multiple colums) then you have to build your form with smarty from scratch.

greetings
bsm


birdseed

Just popping in
Posted on: 2006/7/10 9:07
birdseed
birdseed (Show more)
Just popping in
Posts: 59
Since: 2005/2/26
#24

Re: core 2.2.4: token system annoying

Hi

The token system is there in order to avoid sending the same post request many times. It appears when you click on the "back" Button of your browser, what you shouldnt do on post requests already sent. I wouldn't completely deactivate it. Seems you use modules which have implementation problems with the XOOPS Token. You could simply comment out calls to the $xoopsSecurity class / check command on that specific page where it annoys you.

greetings
birdseed


birdseed

Just popping in
Posted on: 2006/7/10 8:59
birdseed
birdseed (Show more)
Just popping in
Posts: 59
Since: 2005/2/26
#25

Re: Module development - AddElement

Hi

There is a certain runtime overhead in using the XoopsForms which would be still worse is they were implemented as smarty templates. So xoopsforms are quite as they should be. Remember that smarty tends to be slow because every template has to be loaded from the file cache, checked it if need compilation, a lot of smarty logic, the plugin loader.... I don't start to talk about what a <{section}> tag does and how plugins are executed if they are not compile-time plugins.

I think the code/presentation separation arguments from McNaz are more like "I am a programmer and I do it my way" than what is really necessary. Generally, it is a good style to get HTML out of the php files and encapsulate your business logic into classes, but to not using xoopsforms because of some misunderstood rules...nonono. Use them, they allow you a good programming style.

The XOOPS core is not always consistent, this is quite ugly but usual if code has grown over the time. The most important rule I learned from 3 years of XOOPS programming: Try to understand XOOPS and try to understand the concepts, but stay pragratically.

greetings
birdseed


birdseed

Just popping in
Posted on: 2006/7/8 10:33
birdseed
birdseed (Show more)
Just popping in
Posts: 59
Since: 2005/2/26
#26

Re: Which PHP editors are best?

Hi

I don't think that PhpEclipse provides an integrated debugger. This is probably the best part of Zend Studio.

(available for Windows/Apache too...)

greetings
birdseed


birdseed

Just popping in
Posted on: 2006/7/7 22:10
birdseed
birdseed (Show more)
Just popping in
Posts: 59
Since: 2005/2/26
#27

Re: xoops related gfx

Hi

I think you are quite talented, it look nice, but I can imagine that the XOOPS team will like something more conservative and "grounded", not so stylish and metal and bevels and stuff.

greetings
birdseedmusic


birdseed

Just popping in
Posted on: 2006/7/7 22:02
birdseed
birdseed (Show more)
Just popping in
Posts: 59
Since: 2005/2/26
#28

Re: Which PHP editors are best?

Hi

Zend Studio is the best one. Install it under Linux (Suse 10, Fedora Core 5....) for best performance.

greetings
birdseed


birdseed

Just popping in
Posted on: 2006/6/28 12:21
birdseed
birdseed (Show more)
Just popping in
Posts: 59
Since: 2005/2/26
#29

Re: Cannot log into own site.

You can login by going to http://my_xoops_url/userinfo.php

greetz
bsm


birdseed

Just popping in
Posted on: 2006/6/27 8:35
birdseed
birdseed (Show more)
Just popping in
Posts: 59
Since: 2005/2/26
#30

Re: Special Ranks

Hi

You have to change every template where The Rank is displayed.


<span style='<{if $comment.user.rank == "Moderator"}>blue<{elseif $comment.user.rank== "Admin">red(....)<{/if}>">
<{$comment.user.rank}>
</span>

comment.user.rank is just a suggestion. Please look at the template to find out the rank variable name in the context.

Other suggestion: Hack The getVar Function of the XoopsUser class.

greetings
birdseed



TopTop
« 1 2 (3) 4 5 »