Neklawy Posted May 25, 2011 Share Posted May 25, 2011 Hello everyone I'm need to make show ticket reply with number, such as [update 01, Update 02] same as vBulletin forum in every post (show post) #1 or #2 Can anyone help me for do that? Thanks 0 Quote Link to comment Share on other sites More sharing options...
mojahed Posted May 26, 2011 Share Posted May 26, 2011 Sorry but i didn't understand you 0 Quote Link to comment Share on other sites More sharing options...
Neklawy Posted May 27, 2011 Author Share Posted May 27, 2011 I want see a reply count with output number in each reply 0 Quote Link to comment Share on other sites More sharing options...
equipc Posted May 27, 2011 Share Posted May 27, 2011 I think this could be easy done by editing the template and add a counter in the foreach section. 0 Quote Link to comment Share on other sites More sharing options...
Alistair Posted May 28, 2011 Share Posted May 28, 2011 This could come in very handy - it would be good to have a ticket response number to refer clients to instead of saying "as stated above/in our previous reply". 0 Quote Link to comment Share on other sites More sharing options...
Neklawy Posted May 28, 2011 Author Share Posted May 28, 2011 I think this could be easy done by editing the template and add a counter in the foreach section. How please? This could come in very handy - it would be good to have a ticket response number to refer clients to instead of saying "as stated above/in our previous reply". yeah I mean that and I need it for this, And I am looking for how I can do it for this reason 0 Quote Link to comment Share on other sites More sharing options...
Blueberry3.14 Posted May 29, 2011 Share Posted May 29, 2011 How please?yeah I mean that and I need it for this, And I am looking for how I can do it for this reason I'm not sure why you posted this in "Marketplace", but I can tell you how to do it. We needed this also. Edit the "viewticket.tpl" template, around line 60-64: <td align="right">{$reply.date} <span class="replynum">Reply # {$reply.id}</span></td> The "<span class="replynum">Reply # {$reply.id}</span>" part was added. Btw, the "<span class="replynum">" is for CSS/ styling and optional. Also in the admin templates: admin/templates/v4/viewticket.tpl: Add in on line #392 {$reply.id} The first post in each ticket will be numbered "0", and the subsequent numbers won't be in order (it's based on all the replies to all of your tickets), but it still gives you a unique number for each reply, so you can refer the user back to that specific reply/comment. 0 Quote Link to comment Share on other sites More sharing options...
Neklawy Posted May 29, 2011 Author Share Posted May 29, 2011 I'm not sure why you posted this in "Marketplace" Sorry but WHMCS support told me, This is a right place for my request, so I post is here I already tried with this before that, and I was able to make first reply in each ticket with numbered "1" not "0" But variable {$reply.id}, It is get reply ID in MySQL entry not by reply count in ticket Thanks 0 Quote Link to comment Share on other sites More sharing options...
equipc Posted May 30, 2011 Share Posted May 30, 2011 Do you want to have a number for all message or only for the reply ? Should the first item (initial message) numbered 1 or not ? In other words, do you want this Initial message Reply 1 Reply 2 Reply 3 Reply 4 or this Message 1 Message 2 Message 3 Message 4 I could implement both. I justed tested it on my demo website. 0 Quote Link to comment Share on other sites More sharing options...
Neklawy Posted May 30, 2011 Author Share Posted May 30, 2011 Do you want to have a number for all message or only for the reply ? Should the first item (initial message) numbered 1 or not ? In other words, do you want this Initial message Reply 1 Reply 2 Reply 3 Reply 4 or this Message 1 Message 2 Message 3 Message 4 I could implement both. I justed tested it on my demo website. Hello, Thank you and finally I made this and succeeded same I want, yesterday Thanks a lot for all 0 Quote Link to comment Share on other sites More sharing options...
mojahed Posted May 30, 2011 Share Posted May 30, 2011 Hello, Thank you and finally I made this and succeeded same I want, yesterday Thanks a lot for all Please write here how did you do this, just to help the others 0 Quote Link to comment Share on other sites More sharing options...
equipc Posted May 30, 2011 Share Posted May 30, 2011 Smarty offers the ability to count the element in a foreach section ... For more information, check the smarty documentation ... 0 Quote Link to comment Share on other sites More sharing options...
Dimofinf Posted May 30, 2011 Share Posted May 30, 2011 You can do it easily by editing viewticket.tpl Look for this line: {foreach from=$replies item=reply} Change it to {foreach key=key from=$replies item=reply} Look for after 2 lines : {if $reply.admin} Add this before it : Reply {$key+1} And you are DONE Do the same at client support ticket template Best Regards 0 Quote Link to comment Share on other sites More sharing options...
Dimofinf Posted May 30, 2011 Share Posted May 30, 2011 modification change: Look for this line: {foreach from=$replies item=reply} Change it to {foreach key=key from=$replies item=reply} Look for after 2 lines : {if $reply.admin} Add this before it : Reply {$key} And you are DONE Do the same at client support ticket template {foreach key=key item=reply from=$replies} but instade of : Reply {$key} change it to Reply {$key+1} Best Regards 0 Quote Link to comment Share on other sites More sharing options...
Blueberry3.14 Posted June 22, 2011 Share Posted June 22, 2011 modification change: Look for this line: {foreach from=$replies item=reply} Change it to {foreach key=key from=$replies item=reply} Look for after 2 lines : {if $reply.admin} Add this before it : Reply {$key} And you are DONE Do the same at client support ticket template {foreach key=key item=reply from=$replies} but instade of : Reply {$key} change it to Reply {$key+1} Best Regards Gives me a blank screen. I'll stick with my method 0 Quote Link to comment Share on other sites More sharing options...
Dreamz Posted July 1, 2011 Share Posted July 1, 2011 (edited) EDIT: Nevermind I see what you are wanting. Edited July 1, 2011 by Dreamz 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.