Kayako logo
Modifications & Addon Releases Modification guides and addons are posted here to share with the community. Do not post requests in here!

Notices

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  (#1) Old
Carl Silver Offline
Member
 
Carl Silver's Avatar
 
Posts: 69
Join Date: May 2007
Location: UK
Only show comment option to logged in users - 28-05-2008, 11:08 AM

Got sick of the spam on kb/news/download articles so i've modded it a bit.

From this:


To This:


########
Instructions
########

BACKUP YOUR TEMPLATES BEFORE ADDING THIS.

In Templates » comments FIND:
PHP Code:
  <tr>
    <
td colspan="2" class="smalltext"><{$language[commentsdesc]}></td>
  </
tr
and REPLACE with:
PHP Code:
 <{if $_USER[loggedin] == true}> <tr>
    <
td colspan="2" class="smalltext"><{$language[commentsdesc]}></td>
  </
tr

FIND:
PHP Code:
<{if $_USER[loggedin] == true}>
  <
tr class="smalltext">
    <
td><{$language[cmname]}><BR /><{$_USER[fullname]}><input name="fullname" value="<{$_USER[fullname]}>" type="hidden" /></td>
    <
td><{$language[cmemail]}><BR /><{$_USER[primaryemail]}><input name="email" value="<{$_USER[primaryemail]}>" type="hidden" /></td>
  </
tr>
  <{else}>
  <
tr class="smalltext">
    <
td><{$language[cmname]}><BR /><input id="fullnameinput" name="fullname" type="text" size="30" class="swifttext"></td>
    <
td><{$language[cmemail]}><BR /><input name="email" type="text" size="30" class="swifttext"></td>
  </
tr>
  <{/if}> 
REPLACE with:
PHP Code:
 <{if $_USER[loggedin] == true}> <tr>
    <
td colspan="2" class="smalltext"><{$language[commentsdesc]}></td>
  </
tr>
  <
tr class="smalltext">
    <
td style="padding: 10px 10px 10px 10px;"><b><{$language[cmname]}></b> <{$_USER[fullname]}><input name="fullname" value="<{$_USER[fullname]}>" type="hidden" /></td>
  </
tr>
  <
tr>
    <
td colspan="2" class="smalltext"><{$language[cmcomments]}><BR /><textarea id="commentarea" name="comments" style="WIDTH:98%;" class="swifttextarea" rows="4"></textarea></td>
  </
tr
* NOTE: You may remove the padding if you need to - i added this to fix a bug with our CSS

FIND:
PHP Code:
  </tr>
</
table></div>
 </
td></tr></table>
 <
input type="hidden" name="_m" value="core">
 <
input type="hidden" name="_a" value="addcomment">
 <
input type="hidden" name="commenttype" value="<{$commenttype}>">
 <
input type="hidden" name="typeid" value="<{$commenttypeid}>">
 <{
$formextension}>
 </
form
REPLACE With:
PHP Code:
  </tr>
  <{else}>
  <
tr>
<
table width="100%"  border="0" cellspacing="0" cellpadding="0" style="margin-top:10px;">
 <
tr>
    <
td align="left" valign="top"><table cellpadding="0" cellspacing="0" border="0" width="100%" class="tborder">
 <
tbody><tr class="errorbox"><td><table border="0" cellpadding="3" cellspacing="1" width="100%">
 <
tr><td width="16" align="left" valign="middle"><img src="<{$themepath}>icon_error.gif" border="0" /></td><td align="left" class="errorbox"><span class="smalltext">You must be logged in to post comments</span></td></tr></table></td></tr></tbody></table><BR /></td>
    <
td width="5"><img src="<{$themepath}>space.gif" width="5" height="1" /></td>
 </
tr>
  </
tr>
  <{/if}>
</
table></div>
 </
td></tr></table>
 <
input type="hidden" name="_m" value="core">
 <
input type="hidden" name="_a" value="addcomment">
 <
input type="hidden" name="commenttype" value="<{$commenttype}>">
 <
input type="hidden" name="typeid" value="<{$commenttypeid}>">
 <{
$formextension}>
 </
form
My first mod so i hope this is easy to follow lol - feedback appreciated.


Carl Silver
----------------------
Leapfrog Computers LTD
http://www.leapfrogcomputers.co.uk
Kayako Modification and Design | Website Design and Development | Hosting and Domain Registration

Last edited by Carl Silver; 29-05-2008 at 08:31 AM.
   
Reply With Quote
  (#2) Old
Jamie Edwards Offline
Operations Manager
 
Jamie Edwards's Avatar
 
Posts: 5,120
Join Date: Jan 2006
Location: United Kingdom
28-05-2008, 11:09 AM

Excellent share, thanks Carl


Jamie Edwards (jamie.edwards ]at[ kayako.com)
----------------------------------------------------------------
---
  • New to the forum? New user's guide here.
  • Submit bug reports here.
  • Submit support tickets via the members area.
  • Submit sales queries either via live chat or via e-mail.
  • There is no official ETA on Version 4.
   
Reply With Quote
  (#3) Old
Dewak Offline
Member
 
Dewak's Avatar
 
Posts: 130
Join Date: Feb 2008
29-05-2008, 01:45 AM

Carl this is awesome, thanks for sharing


Andres Berdugo
Email & MSN: andres[at]dewak.com
Skype: andres.dewak
Dewak: Kayako Development, Consultancy and Support
http://www.dewak.com
   
Reply With Quote
  (#4) Old
Carl Silver Offline
Member
 
Carl Silver's Avatar
 
Posts: 69
Join Date: May 2007
Location: UK
29-05-2008, 08:28 AM

Thanks guys

If anybody has any problems with my (dodgy ) code edits i will try and support it as best i can

- Carl


EDIT:
Fixed a bug in the code


Carl Silver
----------------------
Leapfrog Computers LTD
http://www.leapfrogcomputers.co.uk
Kayako Modification and Design | Website Design and Development | Hosting and Domain Registration

Last edited by Carl Silver; 29-05-2008 at 08:32 AM.
   
Reply With Quote
Reply

Tags
comment, logged, option

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to see all on-line staff users bardfor SupportSuite, eSupport and LiveResponse 4 01-08-2008 08:43 PM
Free Make Live chat icon only available to logged in users Jamie Edwards Modifications & Addon Releases 9 24-02-2008 08:03 PM
Ticket re-open option in a user's support account? kevintufts SupportSuite, eSupport and LiveResponse 4 11-05-2007 07:54 PM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46