REQS: template vars + pimenu + content fields + multilingual support

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
ZYV
Language Partners
Language Partners
Posts: 868
Joined: Tue Nov 15, 2005 9:08 pm

REQS: template vars + pimenu + content fields + multilingual support

Post by ZYV »

Hi,

I am quite new to CMSMS and the community, but it seems to me, that it's a really good one after trying to write my own, then using ready-made customized version of Joomla/Mambo. I am actually looking forward to create more sites basing on CMSMS, however, I have several suggestions to implement, after building my first website on CMSMS v0.10.4.

1) I think we need to add some more template variables to make templating more flexible and exclude the need to add PHP code into the template or writing custom tags. Personally, I needed {$root_url} (the same value as in the config), {$curpage} (current page's alias WITHOUT the extension), {$cururl} (current page's alias WITH the extension) and finally {$curlang} (my site is multilingual, I actually made use of pimenu, but used slightly other technique then proposed by Piratos).

What I did to achieve this is to write a custom function and insert {initvalues} call in the templat, but I think this is not a very good solution and such functionality must be in the core.

2) I think we need to include pimenu in the official distro instead of bullet menu, cssmenu elnav etc, or write another caching smarty template-based menu and replace all other menu plugins with it (sorry Jan, your idea is credibly great, but currently pimenu is really poorly coded). All the plugins thus could be replaced by Smarty menu templates, which then could be edited from the Admin area... an incredibly flexible system. Get a menu you want, how you want it to be and don’t change a single line in the core!

Thus, it would be great if the menu design for this ultra-cool menu plug-in could be moved in the Templates section of the Admin area. This will give us the flexibility we need and CMSMS will really beat any other CMSs designed for semi-professional and professional purpose.

3) The content fields. Currently, we have the ability to insert the content blocks. This system is very nice, but I think we also need content fields. They will differ from the blocks - blocks would be the large text blocks edited by TinyMCE or another editor, while fields are just the text input fields.

The purpose is evident: meta tags, different slogans for different pages, different header images for different pages etc. Also basically the same then the blocks so easy to implement, while would give an incredible flexibility.


UPDATE:
[22:28] #3 is already done
[22:29] {content block='blah' wysiwyg='false'} or {content block='blah' singleline='true'}
[22:29] wishy: WOW!!!
[22:29] That should work in 10.4 or it's a 11.5 feature?
[22:29] ZYV: In beta4 or 5, I foget
[22:31] OK, I am sorry about #3. I didn't know it was already done :) That proves how brillkiant the idea was =)
4) Many people ask for the multilingual support, built in the core. Well, I am also asking for this. This wish has a lower priority, since it is easy enough to implement using the smarty-based menu and adding 2 lines of code in the index.php, but anyway, that IMHO should in the core. The core is well-designed so adding a multilingual support shouldn’t take much time.

That’s all I have to say, I would stress that the 1-3 items are quite easy but would be a hughe step forward, so I think they could be implemented before 0.11 release and certainly before 1.0 :)

Unfortunately I am finishing my web-related work, because the session is only one moth away, but if I had time, I could try to help to implement all this.

--Yury.

[attachment deleted by admin]
Last edited by ZYV on Mon Nov 28, 2005 7:34 pm, edited 1 time in total.
unsigned double ZYV;
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm
Location: behind my desk

Re: REQS: template vars + pimenu + content fields + multilingual support

Post by petert »

ZYV wrote: (sorry Jan, your idea is credibly great, but currently pimenu is really poorly coded).
Now you have done it. All his friends will attack you now. No way their god makes poorly coded stuff.
btw: I totaly agree with you :)
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
kishman155
Translator
Translator
Posts: 169
Joined: Sat Mar 12, 2005 12:30 pm
Location: Vienna

Re: REQS: template vars + pimenu + content fields + multilingual support

Post by kishman155 »

I think your idears are good some things don't needed to implemented becouse they are
already there.

For 1 this could be a choice
Sets the curentlanguage from the config in module wich is loaded

Code: Select all

$this->curlang=$config['locale'];
set's the Url with rewrite as smarty tag

Code: Select all

$this->smarty->assign('geturl', $this->GetURL());
or

Code: Select all

$url=$this->GetURL();
if ($config["assume_mod_rewrite"])
  {
$url.="?";
}
else
{
$url.="&";
}
$url.=$_Get['something'];
$this->smarty->assign('urlwithsomething', $url);
Gives back the whole url

Code: Select all

function GetURL()
  {
  global $gCms;
  $config = $gCms->config;
  $url = "";
  if ($config["assume_mod_rewrite"])
  {
  $url = $config["root_url"]."/".$gCms->variables['page'];
  $url .= $config['page_extension'];
  }
  else
  {
  $url = $config["root_url"]."/index.php?".$config["query_var"]."=".$gCms->variables['page'];
  }
  return $url;
  }
mfg
kishman155
ZYV
Language Partners
Language Partners
Posts: 868
Joined: Tue Nov 15, 2005 9:08 pm

Re: REQS: template vars + pimenu + content fields + multilingual support

Post by ZYV »

kishman155
Yeah, I agree with you, that's just another way to do this, but my point is that it should be in the core, because it's very usefull and others might frequently need that as well.
unsigned double ZYV;
kishman155
Translator
Translator
Posts: 169
Joined: Sat Mar 12, 2005 12:30 pm
Location: Vienna

Re: REQS: template vars + pimenu + content fields + multilingual support

Post by kishman155 »

Wishy say it right it's a balance act to make all things done in this CMS.

This CMS works grate now.

I think it could be done in the core but the thing is that many people have
hostings with only 8mb Scriptsize(terible) and older PHP versions.
There are many diskussions about CMSMS to make it more Developerfrendly.


If they make the same things 2times loaded into memory then it's costs more time
to debug as developer need time to copy these codes
into modules or make a moduletemplate like skeleton and add these lines of code
into it.

kishman155
Post Reply

Return to “Developers Discussion”