Image Text Module
Image Text Module
From an idea of Olaf, i started this module.
Donwload and try
http://wiki.cmsmadesimple.org/tiki-down ... p?attId=59
You can view it here:
http://www.awakening.it/test/index.php?page=qwe
To access on administration
user: admin
pass: admin
It's a beta version, next step create the ADMIN management of styles, fonts and cached images.
Bye.
Donwload and try
http://wiki.cmsmadesimple.org/tiki-down ... p?attId=59
You can view it here:
http://www.awakening.it/test/index.php?page=qwe
To access on administration
user: admin
pass: admin
It's a beta version, next step create the ADMIN management of styles, fonts and cached images.
Bye.
Re: Image Text Module
Very nice output, but I cannot see anything on your Admin page for this module?
Re: Image Text Module
I know, i am doing that part, you can enjoy it, changing the content, maybe ADDING new IMAGE TEXT.jah wrote: Very nice output, but I cannot see anything on your Admin page for this module?
Bye

Re: Image Text Module
Aha, now I see from the module help page. This is very interesting. Would it be possible to use this for e.g. the {title} of the content pages?
Re: Image Text Module
I wrote the same thing about ADMIN on first post of this topicjah wrote: Aha, now I see from the module help page. This is very interesting. Would it be possible to use this for e.g. the {title} of the content pages?

About {title} i don't understand very well the request, do you want an Image Text over title caption of your browser????
If it is i don't think it's possible.
Bye

Re: Image Text Module
He means that he wants to automatically create an image with the text that's in {title}. The module could possibly use the ContentTitle function to grab the title and then use it if a usetitle="true" option was passed to the module.
Re: Image Text Module
ooooo :Owishy wrote: He means that he wants to automatically create an image with the text that's in {title}. The module could possibly use the ContentTitle function to grab the title and then use it if a usetitle="true" option was passed to the module.
i am studying ........ work in progress for a solution .......
few time ago i added this parameters {imagetext now='1' format='%d-%m-%Y --- %H:%M:%S ' style='big_bright' }
that create a dinamic ImageText with the current date/time.
i seeing.....
Last edited by megabob3 on Fri Apr 15, 2005 10:26 am, edited 1 time in total.
Re: Image Text Module
Wishy may you give me some hint or tips on how include/lauch/execute a smarty plugin from DEFAULT action of a module?
This request only for find faster a solution.
Bye
This request only for find faster a solution.

Bye

Re: Image Text Module
I did it 
New parameters are:
"now" create the an ImageText with current Date/Time
"format" define the output of the Date/Time
"title" Create an ImageText of your Current PAGE
Bye

New parameters are:
"now" create the an ImageText with current Date/Time
"format" define the output of the Date/Time
"title" Create an ImageText of your Current PAGE
Bye

Re: Image Text Module
Not very WELL now show the page_name and nope Title, work in progress alwasy 

Re: Image Text Module
I don't know of any ways of using a smarty plugin in the default DoAction. The module code isn't really integrated with smarty at all.
Re: Image Text Module
Wishywishy wrote: I don't know of any ways of using a smarty plugin in the default DoAction. The module code isn't really integrated with smarty at all.
in this way i get the page_id
********
global $gCms;
$params['text'] = strtoupper($gCms->variables[page_name]);
********
Starting from $gCms i guess there is a method or something else for get the Title rigth?
Must i access from DB?
Bye

Re: Image Text Module
I was thinking something like this would work... ContentTitle will be called before DoAction('default'), so you should be good.
Code: Select all
class MyModule extends CMSModule
{
var $curtitle;
function ContentTitle(&$title)
{
$this->curtitle = $title;
}
}
Re: Image Text Module
Ok thanks for this info, but at the moment ImageText is a special module, because isn't called like a module but like a smarty TAG.wishy wrote: I was thinking something like this would work... ContentTitle will be called before DoAction('default'), so you should be good.
Code: Select all
class MyModule extends CMSModule { var $curtitle; function ContentTitle(&$title) { $this->curtitle = $title; } }
Inside DoAction('default') i do NOTHING now.
From "function.imagetext.php" plugin of Smartys i got $gCms global variable structure, i am searching a way to get the Title from this structure.
I did this:
Code: Select all
class MyModule extends CMSModule
{
var $curtitle;
function ContentTitle(&$title)
{
$this->curtitle = $title;
}
}
Last edited by megabob3 on Fri Apr 15, 2005 12:53 pm, edited 1 time in total.
Re: Image Text Module
Oh, it's a plugin. Gotcha.
Well, I just looked through the code and title is not put into $gCms anywhere. You're only real option is:
Well, I just looked through the code and title is not put into $gCms anywhere. You're only real option is:
Code: Select all
$contentobj = ContentManager::LoadContentFromId($id, false);
$title = $contentobj->GetName();