Gastbuchmodule 0.5betha

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
kishman155
Translator
Translator
Posts: 169
Joined: Sat Mar 12, 2005 12:30 pm
Location: Vienna

Gastbuchmodule 0.5betha

Post by kishman155 »

New version of Gastbuch is available it's betha but in the next few days it will be ready
downloadable at wiki

New things

Smarty templates for quicker skinable
check lenght of enteret character in new Guestbook entry
smarty tag to hide e-mail from spambots
.
.
.
.

It s will installed as contenttype and you could add it like a content.

please respond me some bucks

It's finished jet but help must be writen and some translations
If somebody wants to help me with translationhe or she will be wellcome
but please wait till i have finished the help and the changelog

thanks for replies

kris
jack

Re: Gastbuchmodule 0.5betha

Post by jack »

get the following error when i try to add an entry:
Fatal error: Smarty error: [in insertform.tpl line 2]: syntax error: unrecognized tag 'geturl' (Smarty_Compiler.class.php, line 580) in /www/htdocs/w0056772/lib/smarty/Smarty.class.php on line 1088

CMSMS V0.10

???
kishman155
Translator
Translator
Posts: 169
Joined: Sat Mar 12, 2005 12:30 pm
Location: Vienna

Re: Gastbuchmodule 0.5betha

Post by kishman155 »

i am sorry there is in the second line at insertform.tpl in the templatesfolder the tag

Code: Select all

 {geturl}
replace it with

Code: Select all

{$geturl}
now it should work

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

Re: Gastbuchmodule 0.5betha

Post by kishman155 »

Hi

gastbuch is updated and i think its ready, please take a look at the helpfile it will help you to find out what it can

There are two language versions inside (cmsms lang)

de_DE
en_US

Please let me know some things i missed
i will update it tomorrow

If you see some misspelling in the Helpfile please post it here or send me mail.
my e-mail it's included in the module so i could correct the missspellings

if you wanna translate the languagefile into other language as english or german
i will include it and upload it to wiki

thanx
kishman155
westis

Re: Gastbuchmodule 0.5betha

Post by westis »

Kishmna155, thanks for a great module!

I upgraded to version 0.5 from 0.4, but the divs seem to be messing up the code. The page where I'm using the guestbook is at http://www.kisima.org/cmsmadesimple/ind ... =Guestbook. The footer worked fine when using 0.4, but now it's stretching across the entire page.

I will translate the module to Swedish soon and send you the file.

I also have a suggestion for a change in the showmessage.tpl file. I use a background color for the message header, so I added a div class for that. I also wanted a border around each message and therefore wrapped the entire showmessage template in another div class. With these two new div classes the guestbook becomes even more customizable.

The template I'm using now looks like this:

Code: Select all

<div class="cms-gastbuch-div-show-post">

    <div class="cms-gastbuch-div-header">
	 	<!-- <div class="cms-gastbuch-div-show-name">{$inam} </div>  -->
	 	<div class="cms-gastbuch-div-show-value-name"><a href="mailto:{$EmailAdresse|escape:"hex"}" >{$absender}</a>  </div> 
	  	<div class="cms-gastbuch-div-show-date">{$sdate}</div> 
	   	<div class="cms-gastbuch-div-show-value-date">{$zeit} {$uhr}</div> 
	 </div>
         
		 <div class="cms-gastbuch-div-show-message">{$message}</div> 
         <div class="cms-gastbuch-div-show-value-message">{$texte}</div>  
		 <!-- <div class="cms-gastbuch-div-show-e-mail">E-Mail</div>  -->
         <div class="cms-gastbuch-div-show-homepage">Homepage</div> 
         <div class="cms-gastbuch-div-show-value-homepage"><a  href="http://{$homepage}" target="_blank">{$homepage}</a>
         </div> 
		 
</div>
westis

Re: Gastbuchmodule 0.5betha

Post by westis »

Me again. I found the solution to my problem. There is one too many closing div in gastbuch.module.php. On line 512 there is a , presumably to enclose the whole module. But it doesn't have a corresponding opening div, at least not that I could find. I commented out line 512 (echo "";) and now it works fine! :-)
kishman155
Translator
Translator
Posts: 169
Joined: Sat Mar 12, 2005 12:30 pm
Location: Vienna

Re: Gastbuchmodule 0.5betha

Post by kishman155 »

you schould gave this inside the template insertform

Code: Select all

<__script__ type="text/javascript">
	<!--	
	{literal}
		function checkLen()
		{ldelim}
			maxLen="{/literal}{$textlengpara}{literal}";
			var txt=document.forms[0].message.value;
			if(txt.length>maxLen)
			{ldelim}
				alert("Bitte maximal "+maxLen+" Zeichen eingeben!");
				document.forms[0].message.value=txt.substring(0,maxLen);
				document.forms[0].zaehler.value=0;
			{rdelim}
			else
			{ldelim}
				document.forms[0].zaehler.value=maxLen-txt.length;
			{rdelim}
		{rdelim}
		//-->
		{/literal}
		</__script>
it's now counting the hit's in the mesagebox
i think you still use the first an older version of the templates
please update the templates from wiki and it's alittle bit nicer.

Thanx that you will translate it to Swedish

your template for showmessage.tpl
I included allready and if i get the Swedish translation i will
release the next version off gastbuch

thanx
kishman155
westis

How do I change the date format?

Post by westis »

Two questions and one suggestion:

1. How can I change the date format? Now it shows dd.mm.yyyy, but I'd like it to show either yyyy-mm-dd or even better like 20 Sep, 2005.

2. How come that in IE the latest three posts in my guestbook at http://www.kisima.org/cmsmadesimple/ind ... =Guestbook have a white space to the left of the header div? The fourth post shows ok though, that's why I find it odd... In FF all shows ok.

3. I would suggest that you also add Location when people write a new entry in the guestbook, so that shows up in the messages too. Always nice to see where people come from... :-)
Last edited by westis on Tue Sep 20, 2005 6:48 pm, edited 1 time in total.
kishman155
Translator
Translator
Posts: 169
Joined: Sat Mar 12, 2005 12:30 pm
Location: Vienna

Re: Gastbuchmodule 0.5betha

Post by kishman155 »

1.) at Line 423 you have a database request

Code: Select all

DATE_FORMAT(datum,'%d %b,%Y, %H:%i') AS datum1
20 Sep, 2005

Code: Select all

DATE_FORMAT(datum,%Y.%m.%d , %H:%i') AS datum1
2005.09.20

2.)IE ? It 's not the first choice but i thing try to use margin at

Code: Select all

.cms-gastbuch-div-header {
    background-color: #781C12;
color: #781C12;
margin: 5px
/*padding: 5px;*/
height: 20px;
}


Into next release i could put an optional template with location into the templates directory and
add the database table location

kishman155
westis

Re: Gastbuchmodule 0.5betha

Post by westis »

Thanks! Fixed the format.

The strange thing with the white space on the left in IE is that it does not show up on the page where a new guestbook item is entered, only on the main page. But that's a very minor thing anyway.


I have encountered three more problems.

1. When I add a guestbook item from the backend admin then the date is not inserted into the database.

2. Again when adding guestbook items from the backend, the text on the buttons are "--Add Me - module: gastbuch string:submit" and "--Add Me - module: gastbuch string:cancel". Shouldn't they just show "Submit" and "Cancel"?

3. When I add a guestbook item from the FRONTEND it is not added to the database even if I have set shownow='1' and I get the confirmation that "Your message was insert" (by the way, I think it should be "inserted").


And lastly, a question. How do I validate an entry if I have not set shownow="1"?

Thanks!
westis

Re: Gastbuchmodule 0.5betha

Post by westis »

Now I've finally translated the Gastbuch module to Swedish. It's really difficult to just translate some words out of their context, so I will probably have to do some modifications later.

And there was one thing that only was in German. Although I understand a bit of German I think it would be safer if you first translate it to English and I translate to Swedish from that.

And by the way $lang['uhr'] should come BEFORE the time in Swedish, like kl. 12.30 (= 12.30 Uhr in German). How can that be done?

Let me know if there are some problems!

And you Swedes out there, please proof-read and test it!!

[attachment deleted by admin]
kishman155
Translator
Translator
Posts: 169
Joined: Sat Mar 12, 2005 12:30 pm
Location: Vienna

Re: Gastbuchmodule 0.5betha

Post by kishman155 »

First of all thanx for translation.

i will add new version in the next few days with bug fixes.
I have added some new things and have some test runs.
1. When I add a guestbook item from the backend admin then the date is not inserted into the database.
Sorry for that i have fixed it
replace case  "completeadd": @ DoAction with this

Code: Select all

 case "completeadd":
  {
  $access = $this->CheckPermission('Modify gastbuch');
  if (!isset($current_page))
  {
    $current_page = 1;
  }
  if (!$access)
{
echo "<p class="error">$accerr</p>";
return;
}
  $error = '';
  if (isset($params['cancelsubmit']))
  {
  $this->
  Redirect($id, 'defaultadmin');
  }
  $validinfo = true;
  $ID = (isset($params['ID'])?$params['ID']:"");
  $absender = (isset($params['absender'])?$params['absender']:"");
  $e_mail = (isset($params['e_mail'])?$params['e_mail']:"");
  $homepage = (isset($params['homepage'])?$params['homepage']:"");
  $message = (isset($params['message'])?$params['message']:"");
  $now= date("Y-m-d H:i:s");
  
  if ($absender== "")
  {
  $error .= "
  
  <li>
    Kein Absender eingegeben
    
  </li>
  ";
  $validinfo = false;
  }
  if ($validinfo)
  {
  $new_id = $db->
  GenID(cms_db_prefix()."module_gastbuch_seq");
  $querystart = "INSERT INTO ".cms_db_prefix()."module_gastbuch (absender, e_mail, homepage, message, datum)";
  $queryend = " VALUES (?,?,?,?,?";
  $params = array($absender, $e_mail, $homepage, $message, $now);
  $query = $querystart . $queryend . ")";
  $dbresult = $db->Execute($query, $params);
  $this->Audit($ID, 'gastbuch', 'Neuen Eintrag hinzugefügt');
  $this->Redirect($id, 'defaultadmin');
  return;
  }
  else
  {
  $this->
  AdminForm($id, 'completeadd', $error, $absender, $e_mail, $homepage, $message, $ID);
  }
  break;
  }
2. Again when adding guestbook items from the backend, the text on the buttons are "--Add Me - module: gastbuch string:submit" and "--Add Me - module: gastbuch string:cancel". Shouldn't they just show "Submit" and "Cancel"?
replace this @ line 148 and 149

Code: Select all

$this->smarty->assign('submit', $this->CreateInputSubmit($id, 'submit', $this->Lang('submit')));
  $this->smarty->assign('cancel', $this->CreateInputSubmit($id, 'cancelsubmit', $this->Lang('cancel')));
with this

Code: Select all

		$this->smarty->assign('submit', $this->CreateInputSubmit($id, 'submit', Lang('submit')));
		$this->smarty->assign('cancel', $this->CreateInputSubmit($id, 'cancelsubmit', Lang('cancel')));
3. When I add a guestbook item from the FRONTEND it is not added to the database even if I have set shownow='1' and I get the confirmation that "Your message was insert" (by the way, I think it should be "inserted").
And lastly, a question. How do I validate an entry if I have not set shownow="1"?
replace this @ line 284

Code: Select all

$query .=" '".$_POST[message]."', now(),)";
with

Code: Select all

			$query .=" '".$_POST[message]."', now(), $pruef)";
To validate a message you should go to your admin pannel of gastbuch
and only check the entrie from false to true like at the pages Aktiv true
And by the way $lang['uhr'] should come BEFORE the time in Swedish, like kl. 12.30 (= 12.30 Uhr in German). How can that be done?
For now it's not available the datetime in the database must be splitted.

I will ad it at the next release comes next few days.

kishman155
westis

Re: Gastbuchmodule 0.5betha

Post by westis »

Thanks kishman155!!

When I click to deactivate a message I get a popup message that is hardcoded in gastbuch.module.php: "Sind sie sicher das sie diesen Datensatz löschen möchten?". I suppose that could be put in the language file too.

And what does the following sentence in German mean in English, as it is in German also in the English language file? "gibt an wieviele zeichen eingegeben werden können standard sind 1000Zeichen. Diese werden sowohl Userseitig als auch Serverseitig überprüft."

:-)
kishman155
Translator
Translator
Posts: 169
Joined: Sat Mar 12, 2005 12:30 pm
Location: Vienna

Re: Gastbuchmodule 0.5betha

Post by kishman155 »

I am sorry
gibt an wieviele zeichen eingegeben werden können standard sind 1000Zeichen. Diese werden sowohl Userseitig als auch Serverseitig überprüft
It means: set's how much characters are postable standard is 1000 character. These character would be checked  from Usersite and from the Server.

I have already added to the nearly ready update for wiki

this is the translation for activation and deaktivation Confirmmessage

Code: Select all

$lang['ativimes']= 'Are you shure you want to aktivate this message?';
$lang['deaktimes']= 'Are you shure you want to deaktivate this message?';
I will probaly add the new version today or tomorrow.

mfg
kishman155
westis

Re: Gastbuchmodule 0.5betha

Post by westis »

No probs, kishman155. Thanks for the translations. Not to be picky, but it would be "Are you sure you want to acticate this message?".

Could I write the Swedish equivalents of these translations here and you add them to the file? By the way, what do you mean by "These characters would be checked from user site and from the server"? Not sure how to translate that.

"set's how much characters are postable standard is 1000 character. These character would be checked  from Usersite and from the Server."

is in Swedish:

"ställer in hur många tecken som kan skrivas i ett inlägg, standard är 1000 tecken. De här tecknen kontrolleras från användarens sajt och från servern"


"Are you sure you want to acticate/deactivate this message?"

is in Swedish:

"Är du säker på att du vill aktivera/avaktivera det här meddelandet?"
Post Reply

Return to “Modules/Add-Ons”