|
|
#1 |
|
Senior Member
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 235
Rep Power: 11 ![]() ![]() |
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) |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Mar 2006
Posts: 4,103
Rep Power: 100 ![]() ![]() |
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 |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 235
Rep Power: 11 ![]() ![]() |
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) |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Mar 2006
Posts: 4,103
Rep Power: 100 ![]() ![]() |
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 |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 235
Rep Power: 11 ![]() ![]() |
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) |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Mar 2006
Posts: 4,103
Rep Power: 100 ![]() ![]() |
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 |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 235
Rep Power: 11 ![]() ![]() |
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) |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 235
Rep Power: 11 ![]() ![]() |
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) |
|
|
|
|
|
#9 |
|
Moderator
Join Date: Mar 2006
Posts: 4,103
Rep Power: 100 ![]() ![]() |
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 |
|
|
|
|
|
#10 |
|
Senior Member
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 235
Rep Power: 11 ![]() ![]() |
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) |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
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 |