×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: missing a space in the list of comments

missing a space in the list of comments 14 years 5 months ago #7244

  • Franck
  • Franck's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Hello

Whith joomla 1.5.14 and Joomlacomment 4.0


missing a space between date and title in the list of comments area preview.

you have an idea for solving the problem of layout?

Thank

missing a space in the list of comments 14 years 5 months ago #7251

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Which JoomlaComment template are you using?

Also make sure you are running the latest Beta 2.

missing a space in the list of comments 14 years 5 months ago #7254

  • Franck
  • Franck's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
I use modern template whith css black and yes i use v4.0 beta 2

missing a space in the list of comments 14 years 5 months ago #7258

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Oh - you said comments area preview. I havn't seen that part of the code yet, could you post a screenshot?

missing a space in the list of comments 14 years 5 months ago #7261

  • Franck
  • Franck's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0

missing a space in the list of comments 14 years 5 months ago #7264

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
(1) Open up this file from your Joomla install:
components\com_comment\joscomment\
(make sure you use a UTF8 editor such as Notepad++)


(2) Go to line 752, which should have this:
$previewline	= str_replace('{PREVIEW_TITLE}', $title, $previewline);
(if it's the wrong line, just search for it)


(3) Tell the str_replace to add a couple of spaces before it, like this small code change shows:
$previewline	= str_replace('{PREVIEW_TITLE}', '  '+$title, $previewline);
...notice the ---> ' '+ <--- adds a whitespace before the title text on the preview :)
...that should do it. Of course you can make it three spaces if you like, whatever is in the ' ' it's up to you :)

I'll have to remember to tell Daniel about this one, I am surprised nobody has reported this one earlier :huh:

missing a space in the list of comments 14 years 5 months ago #7265

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Also want to let you know, i'm seeing some errors there:
Notice: Undefined variable: com in /homez.92/tvdvd/www/8artcity/v1/components/com_comment/joscomment/comment.class.php on line 727

I had a quick look, it's to do with the Preview Comment part of JoomlaComment, but I don't know why it is doing it and what it means, because it still works for you :laugh:

If you could try this for me...? Go to that line, 727, and just before it (above it on a new line) insert this:
$com = $this->_component;
...and see if that fixes the 'Notice' that PHP is giving you :) You might want to turn off Verbose PHP Output and make it show Errors only!

On second thought, that $com code above probably won't do anything. I think I know why it's happening, something completely different... ANYWAY it'd be best to configure your PHP Error Reporting (Joomla Global Config) to 'Default' or 'None' to get rid of those warnings ;)

missing a space in the list of comments 14 years 5 months ago #7267

  • Franck
  • Franck's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
JonusC wrote:

...notice the ---> ' '+ <--- adds a whitespace


This code do not function.. after installing the code on the site, there is no title on the list of comments

missing a space in the list of comments 14 years 5 months ago #7268

  • Franck
  • Franck's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
for $com = $this->_component; It's ok.. that's good ! but not for the previously code !!

missing a space in the list of comments 14 years 5 months ago #7269

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
My mistake! A plus sign is for JavaScript combining strings, PHP uses a period/dot :blush:

Try this one:
$previewline = str_replace('{PREVIEW_TITLE}', '  '.$title, $previewline);

missing a space in the list of comments 14 years 5 months ago #7270

  • Franck
  • Franck's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
It's ok for all.. thank you very mutch.. i test yet this plugin and i should go to donate..
  • Page:
  • 1
Time to create page: 0.136 seconds