Gbook module help
Gbook module help
Hi all,
Please help to find answer in next question:
When im use a Gbook module fo cmsms and open page with details of any entry - its called by code:
{Gbook action="detail" entryid="2"}
I dont understand, how can i make this page a dynamic. I mean that i need somthenig like that: {Gbook action="detail" entryid="<? echo $_GET['entry_id']; ?>"} - but it doesnt work((
or i try for test:
{Gbook action="detail" entryid="2"}
<? echo $_GET['entry_id']; ?>
and it doenst work too.
Maybe because im use $config['url_rewriting'] = 'mod_rewrite'; ??
Please help and sorry for my english
Please help to find answer in next question:
When im use a Gbook module fo cmsms and open page with details of any entry - its called by code:
{Gbook action="detail" entryid="2"}
I dont understand, how can i make this page a dynamic. I mean that i need somthenig like that: {Gbook action="detail" entryid="<? echo $_GET['entry_id']; ?>"} - but it doesnt work((
or i try for test:
{Gbook action="detail" entryid="2"}
<? echo $_GET['entry_id']; ?>
and it doenst work too.
Maybe because im use $config['url_rewriting'] = 'mod_rewrite'; ??
Please help and sorry for my english
Re: Gbook module help
I don't know why you would want to make pages like that, but I guess you have your own specific reasons for it.
It should work like this:
{Gbook action='detail' entryid=$smarty.get.entry_id}
where entry_id is the get parameter
It should work like this:
{Gbook action='detail' entryid=$smarty.get.entry_id}
where entry_id is the get parameter
Re: Gbook module help
Yes, its work! Thank u soo much!Jos wrote:I don't know why you would want to make pages like that, but I guess you have your own specific reasons for it.
It should work like this:
{Gbook action='detail' entryid=$smarty.get.entry_id}
where entry_id is the get parameter
If can tell me a better way to make that page i'll be very grateful to u!
Re: Gbook module help
And could you also tell whats wrong?
Im sorry, but i cant understand how smarty works. I know php and ever work with it. Is it possible to work with php code and easy integrate it to any page? Or i must use only smarty lang?
Code: Select all
{literal}<? If (is_set($_GET['nomer'])) { ?>{/literal}
{Gbook action='detail' entryid=$smarty.get.nomer}
{literal}<? } else { ?>{/literal}
{Gbook action='default'}
{literal}<? } ?>{/literal}Re: Gbook module help
If you know php, smarty is very easy to understand, check documentation on http://www.smarty.net/docs/en/mma wrote:And could you also tell whats wrong?
Im sorry, but i cant understand how smarty works. I know php and ever work with it. Is it possible to work with php code and easy integrate it to any page? Or i must use only smarty lang?
or check the example templates that comes with every module
in your case:
Code: Select all
{if isset($smarty.get.nomer)}
{Gbook action='detail' entryid=$smarty.get.nomer}
{else}
{Gbook action='default'}
{/if}Re: Gbook module help
Thank u very much. Yeah, looks like more then easy) Ill try to understand Smarty again.
If u well know this module, could u also get help in next code (off course if u can):
This a code of new msg form submit template. I cant understand, how can i add a new field to submit form? it is at all possible?
thanks in advance..
If u well know this module, could u also get help in next code (off course if u can):
Code: Select all
<div class="gbook_form">
{if !empty($gbook_errormessage)}<p class="gbook_error">{$gbook_errormessage}</p>{/if}
{$gbook_startform}
<div class="gbook_field{if $gbook_name_error} gbook_field_error{/if}">
<label for="{$gbook_name_field}">{$gbook_name_label}</label>{$gbook_name_input}
</div>
<div class="gbook_field{if $gbook_email_error} gbook_field_error{/if}">
<label for="{$gbook_email_field}">{$gbook_email_label}</label>{$gbook_email_input}
</div>
<div class="gbook_field{if $gbook_title_error} gbook_field_error{/if}">
<label for="{$gbook_title_field}">{$gbook_title_label}</label>{$gbook_title_input}
</div>
<div class="gbook_field{if $gbook_message_error} gbook_field_error{/if}">
<label for="{$gbook_message_field}">{$gbook_message_label}</label>{$gbook_message_input}
</div>thanks in advance..
Re: Gbook module help
Got it! Iv got it by myself. But now new question and answer for it i cant find in smarty manual.
How i can mae changeable some style params like width, height.
Thanks.
Code: Select all
$smarty->assign('gbook_message_label', $this->Lang('message'));
$smarty->assign('gbook_message_field', $id . 'message');
$smarty->assign('gbook_message_input', $this->CreateTextArea(false, $id, html_entity_decode($params['message'],ENT_QUOTES), 'message', '', $id . 'message'));
$smarty->assign('gbook_message_error', in_array('message', $fielderrors) ? 1 : '');Thanks.
Re: Gbook module help
Additional:
Add a new field to form submit i did. added new fied to bd also. But now, CMSMS when form is submit doesnt save a new value to new bd field, it saved to field "title" and real title value doesnt saved)
Add a new field to form submit i did. added new fied to bd also. But now, CMSMS when form is submit doesnt save a new value to new bd field, it saved to field "title" and real title value doesnt saved)
Re: Gbook module help
To style these you need to look in the rendered page source to see what you can target, I have never used this module but some require that you hit a button to get the new filed to show up in a template for results, like form builder...
Re: Gbook module help
No, with Gbook it is currently not possible to add extra fields. Please do not mess with the php files. You will have a problem as soon as an update comes alongmma wrote:I cant understand, how can i add a new field to submit form? it is at all possible?
Re: Gbook module help
Dr.CSS wrote:To style these you need to look in the rendered page source to see what you can target, I have never used this module but some require that you hit a button to get the new filed to show up in a template for results, like form builder...
omg what is it
i cant believe it(( i so much need in city field(Jos wrote:No, with Gbook it is currently not possible to add extra fields
ok, big thanks for ur help
Re: Gbook module help
Currently on one of my own sites I use the title field for city.mma wrote:i cant believe it(( i so much need in city field(Jos wrote:No, with Gbook it is currently not possible to add extra fields
ok, big thanks for ur help
I think I will add a dedicated city field with a next release.
Re: Gbook module help
got a new question((
I have two guestbooks.
One of them (which is default) called by {Gbook action="default"}. Page for msg add with form called by {Gbook action="form"}. Everything works good.
But if i want to add msg to another gbook alias, which called by {Gbook action="default" alias="name_of_gb_2"} ?
If i use {Gbook action="form" alias="name_of_gb_2"} its doesnt work. Pls help Jos!
I have two guestbooks.
One of them (which is default) called by {Gbook action="default"}. Page for msg add with form called by {Gbook action="form"}. Everything works good.
But if i want to add msg to another gbook alias, which called by {Gbook action="default" alias="name_of_gb_2"} ?
If i use {Gbook action="form" alias="name_of_gb_2"} its doesnt work. Pls help Jos!
Last edited by mma on Sun Jul 14, 2013 10:34 pm, edited 1 time in total.
Re: Gbook module help
Also I could give you more correctly language translation (Russian) for you're module, if ure a creator.
And please anybody help with upside question
Coz it cannot be started an important part of my medical portal.
And please anybody help with upside question
Coz it cannot be started an important part of my medical portal.
Re: Gbook module help
Works for me... maybe browser cache (ctrl-F5), or your message was marked as spam?mma wrote:if i want to add msg to another gbook alias, which called by {Gbook action="default" alias="name_of_gb_2"} ?
If i use {Gbook action="form" alias="name_of_gb_2"} its doesnt work.
Translations are very welcome.mma wrote:Also I could give you more correctly language translation (Russian) for you're module, if ure a creator.
Please signup here: http://dev.cmsmadesimple.org/signup
Then login and hit "Request to join" here: http://dev.cmsmadesimple.org/projects/russian
Then after your request got approved, do your translations here: http://translations.cmsmadesimple.org/
After you completed the translation, you can grab the latest translationfiles here: http://svn.cmsmadesimple.org/svn/transl ... /lang/ext/
Each new release I will include the latest files automatically.




