Hallo!
ich würde gerne mein Gästebuch um eine ratingfuntion erweitern. Das Gästebuch befindet sich auf jedem Userprofil und soll dazu dienen, den User zu bewerten. Ich habe im Internet auch ein ratingtool gefunden, aber da ich mich in dieser matierie leider 0 ausenne, weiß ich nicht, wo ich was einsetzen muss :confused:
hier erstmal das ratingtool:
http://www.downloadjavascripts.com/list/javasiteooo47/Details.aspx
Ich habe ebenfalls mal den code von meinem Gästebuch rauskopiert, da das ratingtool ja dort eingesetzt werden soll.
ZitatAlles anzeigen{{user_gb==true.start}}
<script language="Javascript">
function confirmBox(url) {
if(confirm('Wollen Sie diesen Eintrag wirklich löschen?')) document.location.href = url;
}
</script>
<br /> <br /><br/>{{user_gb_canpost==true.start}}
<div align="left"><h2>Einen neuen Gästebuch-Eintrag schreiben</h2></div>
<div class="c_r_cont1"><div class="c_r_top1"><div></div></div><div class="c_r_content1">
<script LANGUAGE="javascript">
<!--
function chkFormular() {
if(document.newms.text.value == "") {
alert("Bitte geben Sie einen Beitrag ein!");
document.newms.text.focus();
return false;
}
if(document.newms.name.value == "") {
alert("Bitte geben Sie einen Absender ein!");
document.newms.name.focus();
return false;
}
}
function returnTag(inTag) {
insert(inTag,'');
}
function insert(aTag, eTag) {
var input = document.forms['newms'].elements['text'];
input.focus();
if(typeof document.selection != 'undefined') {
var range = document.selection.createRange();
var insText = range.text;
range.text = aTag + insText + eTag;
range = document.selection.createRange();
if (insText.length == 0) {
range.move('character', -eTag.length);
} else {
range.moveStart('character', aTag.length + insText.length + eTag.length);
}
range.select();
} else if(typeof input.selectionStart != 'undefined') {
var start = input.selectionStart;
var end = input.selectionEnd;
var insText = input.value.substring(start, end);
input.value = input.value.substr(0, start) + aTag + insText + eTag + input.value.substr(end);
var pos;
if (insText.length == 0) {
pos = start + aTag.length;
} else {
pos = start + aTag.length + insText.length + eTag.length;
}
input.selectionStart = pos;
input.selectionEnd = pos;
} else {
input.value = input.value + aTag + eTag;
input.focus();
}
}
//-->
</script>
<form method="post" action="{{user_gb_form}}" name="newms" onSubmit="return chkFormular();">
<a name="user_guestbook_new"><table border="0" width="100%">
<tr>
<td width="10%">
{{user_registered==false.start}} <b>Absender</b> </td><td width="90%"><input type="text" name="name" value="" class="inputbox">{{user_registered==false.end}}</td></tr><tr><td colspan="2">
<br/><br/>{{iconbar}}</br>
<textarea name="text" class="inputbox" style="width: 100%; height: 150px;" id="commentar"></textarea>{{captcha==true.start}}
<img src="{{captcha_image}}"><b>Sicherheitsabfrage*</b><br>Tippen Sie die Buchstaben hier ein:<br><input type="text" name="captcha" size="6" style="width:80px"><small>*Zur Vermeidung von Spam</small>
{{captcha==true.end}}
</td></tr>
<tr>
<td colspan="2" align="left"><input type="submit" value="Eintrag speichern" class="button1"></td>
</tr></table>
</form></div><div class="c_r_bottom1"><div></div></div>
</div>
<br/><br/>
{{user_gb_canpost==true.end}}
{{userGbPosts==true.start}}
<div class="c_r_cont1"><div class="c_r_top1"><div></div></div><div class="c_r_content1">
<table width="100%"><tr><td style="width:50%; text-align:left">
<a href="#" name="comments"></a><h2 style="display: inline;">Eigenes Gästebuch</h2> {{show_pages==true.start}}{{pages_html}}{{show_pages==true.end}}
</td>
<td style="width:50%; text-align:right">
{{user_gb_canpost==true.start}}<a href="#user_guestbook_new" style="float: right;"><small>Neuen Eintrag schreiben</small></a>{{user_gb_canpost==true.end}}
</td></tr></table>
<div style="clear:both"></div></div><div class="c_r_bottom1"><div></div></div>
</div>
<div style="clear:both"></div>
{{userGbPosts==true.end}}<br/><br/>
{{tick(profile_pre_gb)}}
{{userGbPosts.startlist}}
<div class="c_r_cont1"><div class="c_r_top1"><div></div></div><div class="c_r_content1">
<table width="100%">
<tr>
<td align="center" valign="top" style="padding: 5px 15px 5px 5px; min-width: 20%;" width="20%">
{{userGbPosts:userid==true.start}}
<a href="{{userGbPosts:userlink}}"><b>{{userGbPosts:username}}</b></a> <br/> <small><i>{{userGbPosts:datum|dateformat}}</i></small> <br/>{{message:usertitle}}<br>
{{userGbPosts:userimage==true.start}}<br/><a href="{{userGbPosts:userlink}}"><img src="{{userGbPosts:userimage}}" width="{{userGbPosts:avatar_width}}" height="{{userGbPosts:avatar_height}}" style="border: none;"></a>{{userGbPosts:userimage==true.else}}
{{userGbPosts:userlink==true.start}}<a href="{{userGbPosts:userlink}}">{{userGbPosts:userlink==true.end}}<img src="{{global_user_profile}}" style="border: none;">{{userGbPosts:userlink==true.start}}</a>{{userGbPosts:userlink==true.end}}
{{userGbPosts:userimage==true.end}}{{userGbPosts:userid==true.else}}
{{userGbPosts:username}}
{{userGbPosts:userid==true.end}}
</td><td style="padding: 5px 10px 5px 15px; text-align: justify; width: 80%;">
{{user_gb_candel==true.start}}<div style="float: right;"><small><a href="javascript:confirmBox('{{userGbPosts:del_link}}');">Eintrag löschen</a></small></div>{{user_gb_candel==true.end}}
<div style="clear: both;"></div>{{userGbPosts:text}}
{{userGbPosts:signature==true.start}}<br/><br/><hr/><br/>{{userGbPosts:signature}}{{userGbPosts:signature==true.end}}
</td>
</tr>
</table><div style="clear:both"></div>
</div><div class="c_r_bottom1"><div></div></div>
</div>
<div style="clear:both"></div>
<br/>
{{tick(profile_after_gbpost)}}
{{userGbPosts.end}}
{{tick(profile_after_last_gbpost)}}
{{userGbPosts==true.end}}<br/><br/>
{{userGbPosts==true.start}}
{{pages_html.start}}
<div class="pagesBg">
<span class="pages">Seite {{pages_current}} von {{pages_all}}</span>
<a {{previouspagelink==true.start}}href="{{previouspagelink}}"{{previouspagelink==true.else}} class="inactive" {{previouspagelink==true.end}} >« vorherige Seite</a>{{previouspagelink==true.end}}
{{tick(thread_in_page_box)}}
{{pages|strip_pages(5)}}
{{first.start}}0{{first.end}}
{{pages.startlist}}
{{current_page.startint}}{{pages:page}}+{{pages_offset}}{{current_page.end}}
{{pages:now==true.start}}
<span href="{{pages:link}}" class="pageNow">{{current_page}}</span>
{{pages:now==true.else}}{{pages:strip_before==true.start}}
<a class="inactive">...</a>
{{pages:strip_before==true.end}}
<a href="{{pages:link}}" >{{current_page}}</a>
{{pages:now==true.end}}
{{first.start}}1{{first.end}}
{{pages.end}}
<a{{nextpagelink==true.start}} href="{{nextpagelink}}"{{nextpagelink==true.else}} class="inactive" {{nextpagelink==true.end}} >nächste Seite »</a>
<span style="clear: both;"></span>
</div>
{{pages_html.end}}
{{show_pages==true.start}}{{pages_html}}{{show_pages==true.end}}
{{userGbPosts==true.end}}
Ich hoffe, dass mir hier geholfen werden kann, nachdem schon einige posts in anderen foren unbeantwortet geblieben sind =/
Mfg Jeckyll