Support Forums

Old 01-05-2009, 04:05 PM   #1
Senior Member
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 235
Rep Power: 11
hel68c is just really nicehel68c is just really nice
Default How to block url link in ads

I'm trying to prevent the entry of links and e-mails in ads. But no result.

I tried to setup in Bad Word Settings (eg. "*. com" by "hobbyclassified.com") but it erases all the ad. I tried (eg. ".com" with "HobbyClassified.com") it replaces http://mywebsite.com by http://mywebsiteHobbyClassified.com

I would like to replaced the link with another word (eg. "http://yourwebsite.com" by "HobbyClassified.com" or "[email protected]" by "[email protected]")

Have you any idea how?

Thank and Happy New Year 2009!
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News, VBulletin Usershare)
hel68c is offline   Reply With Quote
Old 01-05-2009, 04:07 PM   #2
Moderator
 
 
Join Date: Mar 2006
Posts: 4,103
Rep Power: 100
Lhotch is just really niceLhotch is just really nice
Default

Which ad field are you referring to? URL field? Short description field? Long description field?
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline   Reply With Quote
Old 01-05-2009, 04:23 PM   #3
Senior Member
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 235
Rep Power: 11
hel68c is just really nicehel68c is just really nice
Default

It's for long description and title.
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News, VBulletin Usershare)
hel68c is offline   Reply With Quote
Old 01-05-2009, 04:29 PM   #4
Moderator
 
 
Join Date: Mar 2006
Posts: 4,103
Rep Power: 100
Lhotch is just really niceLhotch is just really nice
Default

As per the "badword" instructions anything you place in the bad word field would be replaced with the replacement word so what you are experiencing is exactly what is expected.

Best you can do without modifying the code itself is to simply add bad words and a space for the text to replace it with.
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline   Reply With Quote
Old 01-05-2009, 04:33 PM   #5
Senior Member
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 235
Rep Power: 11
hel68c is just really nicehel68c is just really nice
Default

Do you know if it's possible to block url or email in ads?

I mean in description and title field.
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News, VBulletin Usershare)
hel68c is offline   Reply With Quote
Old 01-05-2009, 05:49 PM   #6
Moderator
 
 
Join Date: Mar 2006
Posts: 4,103
Rep Power: 100
Lhotch is just really niceLhotch is just really nice
Default

Quote:
Originally Posted by hel68c View Post
Do you know if it's possible to block url or email in ads?
Yes its possible. You would have to edit code and incorporate some regular expression on the input to check for an alter what gets placed in the database.
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline   Reply With Quote
Old 01-05-2009, 06:18 PM   #7
Senior Member
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 235
Rep Power: 11
hel68c is just really nicehel68c is just really nice
Default

I will try to find something to block url and email in step3.tpl and usermodifylisting.tpl before it write to the database . (Javascript maybe)

Thank you Lhotch,
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News, VBulletin Usershare)
hel68c is offline   Reply With Quote
Old 01-06-2009, 04:34 PM   #8
Senior Member
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 235
Rep Power: 11
hel68c is just really nicehel68c is just really nice
Default

Anybody know where I can find a javascript routine to block the entry of URL from description field in the step3.tpl and usermodifylisting.tpl template?

Thanks
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News, VBulletin Usershare)
hel68c is offline   Reply With Quote
Old 01-06-2009, 04:52 PM   #9
Moderator
 
 
Join Date: Mar 2006
Posts: 4,103
Rep Power: 100
Lhotch is just really niceLhotch is just really nice
Default

I wouldnt waste time with javascript, just use php's built in regular expression functions, but as I said you will have to modify code and do some trial and error. Regular expression can get pretty tricky.

If what you wanted to do was simple someone would have coughed up a couple lines of code for you but what you want is gonna take a bit of work.
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline   Reply With Quote
Old 01-07-2009, 07:17 AM   #10
Senior Member
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 235
Rep Power: 11
hel68c is just really nicehel68c is just really nice
Default

I put this code in usermodifylisting.tpl. Do you think it can cause conflict, slow down the system or have bad effect?



HTML Code:
{if $checkoutRequireDesc=="Y" && $checkoutDisDesc=="Y"}
{literal}
	if (frm.description.value == '') {
			alert("{/literal}{$smarty.const.LANG_JAVASCRIPT_PLEASE_ENTER} \'{$smarty.const.LANG_DESCRIPTION}{literal}\'.");
			frm.description.focus();
			return (false);
	}
	if (frm.description.value.match("http")) {
			alert("{/literal}'Your message here' {literal}");
			frm.description.focus();
			return (false);
	}
	if (frm.description.value.match("www")) {
			alert("{/literal}'Your message here' {literal}");
			frm.description.focus();
			return (false);
	}	
	if (frm.description.value.match(".com")) {
			alert("{/literal}'Your message here' {literal}");
			frm.description.focus();
			return (false);
	}	
	if (frm.description.value.match(".org ")) {
			alert("{/literal}'Your message here' {literal}");
			frm.description.focus();
			return (false);
	}	
	if (frm.description.value.match(".net ")) {
			alert("{/literal}'Your message here' {literal}");
			frm.description.focus();
			return (false);
	}
	if (frm.description.value.match(".biz ")) {
			alert("{/literal}'Your message here' {literal}");
			frm.description.focus();
			return (false);
	}	
{/literal}
{/if}
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News, VBulletin Usershare)
hel68c is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Home Page Welcome Block outlook v4 Questions & Support 1 06-11-2008 07:32 PM
URL link in AD Soleiltan v3.1 Questions & Support 4 02-10-2008 05:13 PM
block ip Jessej v3.1 Questions & Support 3 01-22-2008 08:37 AM
Where's the download link? jwylie v3.1 Questions & Support 3 07-05-2006 09:35 AM


All times are GMT -4. The time now is 03:10 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0