Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > MISCELLANEOUS > Lounge

Post Reply
 
Thread Tools
  #1  
Old 03-30-2007, 08:22 AM
jdleung Offline
pixelpost guru
 
Join Date: Feb 2006
Location: Foshan, China
Posts: 553
Smile php question

if there is a line in comment

"great shot, please visit <a href="www.xxx.com">mycc.com</a> for more infomation."

is it possible to delete only "<a href="www.xxx.com">mycc.com</a>"? and keep others.
__________________
jdleung's.com @ flickr @ fotoblogs.cn & Addons:Month Calendar & Slideshow & Flickr comment & Modified Addon: Calendar
Reply With Quote
  #2  
Old 03-30-2007, 09:33 AM
Dennis's Avatar
Dennis+ Offline
Team Pixelpost
 
Join Date: Jul 2006
Posts: 2,394
Send a message via MSN to Dennis
Yeah that is possible, but if the url is either in a blacklist or DSBL list, the comment is rejected because it is a spam comment. Spammers tend to find every shot a great shot.
__________________
My photoblog, powered by PixelPost 1.9 dev SVN | My Pixelpost Addons | My Cool Photoblog profile
Reply With Quote
  #3  
Old 03-30-2007, 09:45 AM
jdleung Offline
pixelpost guru
 
Join Date: Feb 2006
Location: Foshan, China
Posts: 553
schonhose, I meant how to write the codes but not pixelpost's function.

thanks.;=)
__________________
jdleung's.com @ flickr @ fotoblogs.cn & Addons:Month Calendar & Slideshow & Flickr comment & Modified Addon: Calendar
Reply With Quote
  #4  
Old 03-30-2007, 04:32 PM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
Read i.e. about preg_replace or ereg_replace functions. They are based on regular expressions thanks to which you need to know only pattern for such part of comments.
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #5  
Old 03-30-2007, 05:16 PM
jdleung Offline
pixelpost guru
 
Join Date: Feb 2006
Location: Foshan, China
Posts: 553
GeoS, I'm confused on using two functions. can it clear whole line "<a href="www.xxx.com">mycc.com</a>", I mean including "www.xxx.com" and "mycc.com", but they are variables. can it?

if it can, would you please write an simple example for me?

thanks.
__________________
jdleung's.com @ flickr @ fotoblogs.cn & Addons:Month Calendar & Slideshow & Flickr comment & Modified Addon: Calendar
Reply With Quote
  #6  
Old 03-31-2007, 12:10 AM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
It should be useful for many of our users:
http://regexlib.com/DisplayPatterns.aspx
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #7  
Old 03-31-2007, 01:11 PM
jdleung Offline
pixelpost guru
 
Join Date: Feb 2006
Location: Foshan, China
Posts: 553
WOW. it's great! GeoS. it took me some time to understand, but it works!
__________________
jdleung's.com @ flickr @ fotoblogs.cn & Addons:Month Calendar & Slideshow & Flickr comment & Modified Addon: Calendar
Reply With Quote
  #8  
Old 03-31-2007, 02:24 PM
austriaka's Avatar
austriaka+ Offline
Team Pixelpost
 
Join Date: Nov 2006
Location: Germany
Posts: 1,175
Send a message via ICQ to austriaka Send a message via AIM to austriaka
and to learn the basics about regular expressions have a look here:
http://www.regenechsen.de/phpwcms/in...regex_englisch
(don't be bothered because it points to an email client, the basics are the same)
:-)

KArin
__________________
Uh!log Photoblog
My Addons
Reply With Quote
  #9  
Old 04-01-2007, 01:22 AM
jdleung Offline
pixelpost guru
 
Join Date: Feb 2006
Location: Foshan, China
Posts: 553
thanks, KArin.
__________________
jdleung's.com @ flickr @ fotoblogs.cn & Addons:Month Calendar & Slideshow & Flickr comment & Modified Addon: Calendar
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 11:29 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs