×

Notice

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

TOPIC: How to get URL to appear

How to get URL to appear 14 years 8 months ago #5565

  • Astro Manne
  • Astro Manne's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Hi, I'm testing out your comment component here: www.usbwifi.co.uk/3-mobile/ztemf627usbmodem.html and it works really well, I like it a lot. :)

How do I make it so the URLs people enter appears with their comments?

I put a Website with the email etc when I posted as Dave Skibbs at the above link, but the website doesn't show. Usually in blogs the name Dave Skibbs would be a link to his site, if you allow it of course. How do I do that?

How to get URL to appear 14 years 8 months ago #5566

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
You will see a smal icon - this is the website link. you can click on it and you wil lgo to the website.

E-mails are not shown.

How to get URL to appear 14 years 8 months ago #5567

  • Astro Manne
  • Astro Manne's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Where is the icon on the above comment, I can't see it?

How to get URL to appear 14 years 8 months ago #5570

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
OMFG!
I'm sorry about that!
open
components/com_comment/jos_comment/templates and open the MTdefault-emotop template. go to images and copy the html.png to
components/com_comment/jos_comment/templates/modern/images

After that open
components/com_comment/jos_comment/templates/css/standard.css

and at the end of the file add:
/*website*/
#comment a.postwebsite:link,
#comment a.postwebsite:visited,
#comment a.postwebsite:hover {
    background: transparent url(../images/html.png) no-repeat scroll 0 0;
    padding: 0 0 0 17px;
    font-weight: normal;
    white-space: nowrap;
}
 

This should show a small image that you can click on to land on the user's website.

P.S. Thank you for that bug report :)

How to get URL to appear 14 years 8 months ago #5572

  • Astro Manne
  • Astro Manne's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Cool, I fixed it.

That last bit should be in omponents/com_comment/jos_comment/templates/modern/css/standard.css

I think I might put his name as the title text so it's better for search engines to encourage people to post comments. :)

How to get URL to appear 14 years 8 months ago #5573

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
well keep in mind that the link that the people post there will not be taken in account from search engines, since they all have the nofollow tag.

How to get URL to appear 14 years 8 months ago #5575

  • Astro Manne
  • Astro Manne's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Well the no follow tag only means for google and yahoo not to pass on page rank, they still follow them - and other search engines ignore that anyway.

Besides, I took off the no follow because I hate it. I might even going to put a big 'this site has do follow comments' sign at the top, not auto approve though obviously. :)

How to get URL to appear 14 years 8 months ago #5587

  • Astro Manne
  • Astro Manne's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
I just noticed this doesn't display properly in IE, guess you use Firefox same as me? I think it's because there's nothing in the anchor text to anchor to. I've changed mine anyway to include the person's name again, but it might work as it is if you put a non-breaking space in there   or you might be better actually putting that image in the html instead of as a background in the CSS?

Anyway, just thought you should know. :)

How to get URL to appear 14 years 8 months ago #5620

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
which version of IE? IE8 is fine.

How to get URL to appear 14 years 8 months ago #5715

  • bruce
  • bruce's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Is there a way to get the url they type in to show instead of the image?

How to get URL to appear 14 years 8 months ago #5722

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
bruce wrote:

Is there a way to get the url they type in to show instead of the image?


1. Open up comment.class.php and go to line 2293 (Beta1 version), if modified just search for the text
title='$website'

2. Change that line from...
$website = "<a class='postwebsite' rel='external nofollow' href='$website' title='$website' target='_blank'></a>";
...to...
$website = "<a class='postwebsite' rel='external nofollow' href='$website' title='$website' target='_blank'>$website</a>";


Should work. The image will still be drawn though, the CSS may need editing. Also you might need to move the {website} tag in the template html to a more suitable position, as the variable length text of a website might push everything else out.

It's a dirty solution though. If the URL is too long it won't be "chopped off" and it'll throw the template completely out of whack.

How to get URL to appear 14 years 8 months ago #5752

  • Astro Manne
  • Astro Manne's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
The above it what I did, apart from I put the persons name as the anchor text, not the URL which will look really poor.

How to get URL to appear 14 years 8 months ago #5763

  • bruce
  • bruce's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
Thanks, that worked, but it does bring me to another question. Is there a way to make the persons display name just show as a link to their site instead of having their name on their twice?

How to get URL to appear 14 years 8 months ago #5767

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Sure, why not? Just remove the {username} tag from the template, i'm sure that'd work fine :)

How to get URL to appear 14 years 8 months ago #5778

  • bruce
  • bruce's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
and how would I move the new name as link over to where the old name was?

How to get URL to appear 14 years 8 months ago #5779

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Simply: Edit the index.html file for the template and move the {website} tag to where the {username} tag was before. ;)

Not so simply: You'll need to make some CSS changes if you want to keep your styling. Unfortunately i'm at work right now so I can't give exact details, but I think username was something like #postheader #username and website is #postfooter #website I can't really remember... you'll need to match the new location of the {website} tag to it's container ID in the CSS.

You might not need to change the CSS actually, just try it and see :)


Oh... there might be a strange layout issue after that though, I can't remember if the {website} tag has some hard-coded layout attributes in the Component class. It might, it might not. Once again just try it and let me know how it goes, i'm saying that moreso you know I can further guide you should it still not look right :)
  • Page:
  • 1
Time to create page: 0.198 seconds