×

Notice

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

TOPIC: name also a website link

name also a website link 8 years 9 months ago #2155

  • bigkarlo
  • bigkarlo's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Hello,

I tried to modify index.html file in that way that a name would be also a website link. I didn't succed :(

Can you please help me.

name also a website link 8 years 9 months ago #2168

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 154
  • Thank you received: 1081
Why do you want to change that? It is more complicated then just changing the index.html. Changes must be made also in the comment.class.php .
If you decide one day to use the CB and want to link to the user profile, what you do then?

name also a website link 8 years 9 months ago #2175

  • bigkarlo
  • bigkarlo's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
I don't really know what CB is :( and on my page there are no profiles. I'm just looking for a way that there would be just a name (+link) without a website picture.

Is that easyer?

name also a website link 8 years 9 months ago #2185

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 154
  • Thank you received: 1081
I find it stupid, but as you wish.
Look at comment.class.php

and find this line:
 /* {username} 	*/
        $html 		= str_replace('{username}', $this->profileLink($name, $this->_user_id), $html);
 
and change to this here
 /* {username} 	*/
$html 		= str_replace('{username}', "<a class='postwebsite' rel='external nofollow' href='$website' title='$website' target='_blank'>".$this->profileLink($name, $this->_user_id).'</a>', $html);
 

Is this working for you?

name also a website link 8 years 9 months ago #2191

  • bigkarlo
  • bigkarlo's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
YES, it works great! :cheer:

Thank you very much.

name also a website link 8 years 9 months ago #2197

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 154
  • Thank you received: 1081
:) can you please fill out this survey :)

compojoom.com/survey/

We need your opinion.

name also a website link 8 years 9 months ago #2208

  • bigkarlo
  • bigkarlo's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
filled ;)

name also a website link 8 years 8 months ago #2459

  • Eric
  • Eric's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Hello,

Thanks for your work on Joomla comment ! Like bigkarlo, I would like to have the link on the username. The code you gave work well, but I would like to add a condition. If the website is filled, then we have the code you gave us, but if the website is not filled, we just have the username without any <a> link.

I don't know if you understand what I mean, sorry for my english.

Thanks,

Eric

name also a website link 8 years 8 months ago #2476

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 154
  • Thank you received: 1081
Not tested!
if (strcmp($website,'')) {
 /* {username}     */ 
$html         = str_replace('{username}', "<a class='postwebsite' rel='external nofollow' href='$website' title='$website' target='_blank'>".$this->profileLink($name, $this->_user_id).'</a>', $html); 
 
} else {
 /* {username}     */ 
        $html         = str_replace('{username}', $this->profileLink($name, $this->_user_id), $html); 
}
 

name also a website link 8 years 8 months ago #2480

  • Eric
  • Eric's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
It works !! Thanks a lot !

name also a website link 6 years 10 months ago #10813

  • valch
  • valch's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0

Not tested!

if (strcmp($website,'')) {
 /* {username}     */ 
$html         = str_replace('{username}', "<a class='postwebsite' rel='external nofollow' href='$website' title='$website' target='_blank'>".$this->profileLink($name, $this->_user_id).'</a>', $html); 
 
} else {
 /* {username}     */ 
        $html         = str_replace('{username}', $this->profileLink($name, $this->_user_id), $html); 
}
 


Hi!
How I must change the code, that i would like to have a link on the username with email link.
If the email is filled, then we have the link with email, but if the email is not filled, we just have the username without any link.

Thanks,

Valch

name also a website link 6 years 10 months ago #10821

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 154
  • Thank you received: 1081
Valch - this is a terrible idea. Don't show the user emails on the web like this. Your page is crawled from spam bots that only search for e-mails. Once they have them, they start to send spam....

The security of your users is important I advise you to not do this.

name also a website link 6 years 10 months ago #10826

  • valch
  • valch's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Ya, i think about this reason, but in technical specification that is a point whith email link.
Could you please help me with this email link idea.
For example like that site: rdpad.lv/services/deliberative/comments.php?id=86308

Thanks, a lot
Valch

name also a website link 6 years 10 months ago #10830

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 154
  • Thank you received: 1081
In the above example change $this->_user_id wtih $this->_email most probably and it should work (I didn't test it).
But think twice on this!

I as an end user, I'm not going to visit your site for a second time when I see that you are publishing my email there....

name also a website link 6 years 10 months ago #11043

  • Hari Karam Singh
  • Hari Karam Singh's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 0

bigkarlo wrote: I find it stupid, but as you wish.

It's developer unfriendly to have some of the HTML in the templates and the rest encapsulated in the class. There's no reason not to include the link HTML in the template and have the template var {website} simply replace the website url. That way the custom template can decide how its best rather than being locked to any specific paradigm.

name also a website link 6 years 10 months ago #11049

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 154
  • Thank you received: 1081
@Hari, I completly agree with you. We have planned changes to the template engine...
  • Page:
  • 1
Time to create page: 0.127 seconds