Keyword

How do you change the comments form to say "Leave a Review" instead???

  • Randy Mullins
  • Randy Mullins's Avatar Topic Author
  • Offline
  • New Member
More
13 years 2 months ago #98906 by Randy Mullins
I'm new to Joomla and K2 but am familiar with PHP sites

 

I'm trying to use K2 for my product catalog.

 

I want the comments form at the bottom of each item page to be used for "reviews".

 

So where it says "Leave a comment", I need it to say, "Leave a review".

 

How do I accomplish this?

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #98907 by william white
Look at YourSiteRoot/Components/com_k2/templates/default/Item_comments_form.php line 14 in k2 2.4.1

Please Log in or Create an account to join the conversation.

  • Randy Mullins
  • Randy Mullins's Avatar Topic Author
  • Offline
  • New Member
More
13 years 1 month ago #98908 by Randy Mullins
Thanks a bunch, William, but I tried that already and it doesn't seem to have any affect on the page.

 

I just realized that the comments system isn't even working - when I try to submit a comment, the spinning graphic just shows up and nothing else happens. So I may have bigger issues that just changing the text. I'm running this on a local WAMP server, but I don't see how that would change anything.

 

What would help me is to understand what this line of code is doing, and others like it:

 

JText::_('K2_LEAVE_A_COMMENT')"

 

Is the text "K2_LEAVE_A_COMMENT" some sort of variable or object? Is there a 'variables.ini' file somewhere that defines what the output actually will be? If that text produces "Leave a Comment" on the page, then some additional processing is happening.

 

I see a lot of these "JText::" echoes, what is that doing? Is it some sort of augmented string output?

 

Thanks for taking the time to try and help me with this issue. I really do appreciate it.

 

Randy

 

 

 


William White said:

Look at YourSiteRoot/Components/com_k2/templates/default/Item_comments_form.php line 14 in k2 2.4.1

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #98909 by william white
Just try changing the text inside the single quotes

for info on jtext see here

Please Log in or Create an account to join the conversation.

  • Randy Mullins
  • Randy Mullins's Avatar Topic Author
  • Offline
  • New Member
More
13 years 1 month ago #98910 by Randy Mullins
Well, I think I'm losing my mind.

 

No changes I make to the /Components/com_k2/templates/default/Item_comments_form.php file make any difference on my product pages. 

 

In fact, I can delete the entire /templates/ folder from the /com_k2/ folder without any affect on my product page item  display. Serious. 

 

When I delete the /views/ folder, I'll get a fatal error on the product page so I know I'm not in the wrong site root.

 

I'm using the beta SVN version on my Joomla 1.6.3 installation. Could this be the cause? 

 

Do you know of any discussion boards for the SVN beta?

 

Thanks again for your help - i really do appreciate it.

 

Please Log in or Create an account to join the conversation.

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
13 years 1 month ago #98911 by Kannan Naidu Venugopal
I am working on the K2 v2.5 (SVN) and i changed the default value to  <?php echo JText::_('SING TO ME PLEASE') ?> and it works fine.

K2 Rocks \m/

Please Log in or Create an account to join the conversation.

  • Randy Mullins
  • Randy Mullins's Avatar Topic Author
  • Offline
  • New Member
More
13 years 1 month ago #98912 by Randy Mullins
Ok - thanks for confirming this. I do think I have bigger issues going on though.. This is my 2nd installation of Joomla and K2 v2.5 on my local WAMP server. After I installed the 2nd site in a new folder, the first installation's template totally disappeared. I don't understand how the two installations could be conflicting with each other, because each is in it's own separate folder and each uses it's own database in MyPHPAdmin.

I think there is a conflict though. If I can completely delete the /templates/ folder from the /siteroot/components/com_K2/ directory and it doesn't make any difference when I reload my item page, it obviously must be getting that template structure from somewhere else.

 

I appreciate all the help. If, after solving my bigger issues, I still can't change that text, I'll post back.

Please Log in or Create an account to join the conversation.

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
13 years 1 month ago #98913 by Kannan Naidu Venugopal
Are you using the MVC templating ? Is there a folder in root/templates/html/com_k2/templates/[folders] , could it be that your category is using a different layout template ?

K2 Rocks \m/

Please Log in or Create an account to join the conversation.

  • Randy Mullins
  • Randy Mullins's Avatar Topic Author
  • Offline
  • New Member
More
13 years 1 month ago #98914 by Randy Mullins
Holy smokes, you're right!

The k2 templates are embedded in my JSN Dome template...

So my folder structure is, /root/templates/jsn_dome/html/com_k2/templates/default/

 

It works! - Thank You!

 

Now I just need to figure out why the comments form does not work...

 

When I hit the submit button, the spinner graphic appears but nothing else happens. I wonder if maybe because the templates are running out of a separate directory than the controller files, no data is actually being processed and written to the database.

 

Any thoughts?

The Form Action in the correct item_comments_form.php file is this: "echo JURI::root(); ?>index2.php"

 

JURI::root() prints out the URL of the root directory. then tacks index2.php on the end, so it's posting the data to, http://localhost/root/index2.php, a page that does not exist.

 

Thanks again for all the help!

Please Log in or Create an account to join the conversation.

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
13 years 1 month ago #98915 by Kannan Naidu Venugopal
The form action code should be :

 

<form action="<?php echo JRoute::_('index.php'); ?>" method="post" id="comment-form" class="form-validate">

 

Not sure why yours is different, try changing it..

K2 Rocks \m/

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum