hi of course.
So that results page can have an SEO friendly url. So, instead of something like:
http://forum.website.com/search.php?PostBackAction=Search&Keywords=import&Type=Comments&btnSubmit=Search
it would be perhaps:
http://forum.website.com/topics/import
or similar.
the forum just white screened and failed to load at all after I'd switch it on
I hate delete the folder and the line from the extentions file to get the forum back up again -
not even an error message I'm affraid
Hi, is there anyway of removing categories from being indexed? I have a hidden category which is used by the private discussions extension, however the weightedwords extension also used words from members private disucssion and displays them on the site which is a bit awkward....
Can you tell me the name of the add-on you are using so I can look into this? I couldn't find a private discussions add-on.
Edit: I figured out that I could modify the query statement to exclude a particular CategoryID. Try replacing the current $query statement in both places in the default.php file and change "CategoryID <> 2" to the Category you want to exclude. $query = "SELECT * FROM ".$this->Context->Configuration['DATABASE_TABLE_PREFIX']."Comment COM INNER JOIN ".$this->Context->Configuration['DATABASE_TABLE_PREFIX']."Discussion DIS ON COM.DiscussionID = DIS.DiscussionID LEFT JOIN ".$this->Context->Configuration['DATABASE_TABLE_PREFIX']."Category CAT ON DIS.CategoryID = CAT.CategoryID WHERE DIS.CategoryID <> 2 AND Body > ' ' AND CommentID > 1 AND Deleted = '0' AND COM.WhisperUserID = 0";
I also realized this included Whispers which should also be excluded. So I added that.
Looks good. But it would be nice to be able to have an "exclude" list. This add-on reads my BBCode, so of course I have the words img, quote, etc. showing up in huge font.
Someone asked that before but I wasn't sure how to do that. Maybe all I need to do is to add a function that would strip out the html and bbcode tags. I'll look for that.
I did a little experimenting and think the following will work. There are 2 places in the default.php that have this while loop. while ($row = mysql_fetch_array($result)) {
$postwords = strip_tags($row[7]);
$string = $string.$postwords;
}
Change it to look like this. I'm not real good at preg_replace and would hope that others here will check this. while ($row = mysql_fetch_array($result)) {
$postwords = strip_tags($row[7]);
$xbbpostwords = preg_replace('/\[.*?\]/', '', $postwords); // to strip out bbcode
$string = $string.$xbbpostwords;
}
Comments
I tried plugging in your example, but didn't come up with a good solution. Are there any good rules writers out there?
Edit: I figured out that I could modify the query statement to exclude a particular CategoryID. Try replacing the current $query statement in both places in the default.php file and change "CategoryID <> 2" to the Category you want to exclude.
$query = "SELECT * FROM ".$this->Context->Configuration['DATABASE_TABLE_PREFIX']."Comment COM INNER JOIN ".$this->Context->Configuration['DATABASE_TABLE_PREFIX']."Discussion DIS ON COM.DiscussionID = DIS.DiscussionID LEFT JOIN ".$this->Context->Configuration['DATABASE_TABLE_PREFIX']."Category CAT ON DIS.CategoryID = CAT.CategoryID WHERE DIS.CategoryID <> 2 AND Body > ' ' AND CommentID > 1 AND Deleted = '0' AND COM.WhisperUserID = 0";
I also realized this included Whispers which should also be excluded. So I added that.
The query will probably slow down response time.
Let me know how this works.
I did a little experimenting and think the following will work. There are 2 places in the default.php that have this while loop.
while ($row = mysql_fetch_array($result)) { $postwords = strip_tags($row[7]); $string = $string.$postwords; }
Change it to look like this. I'm not real good at preg_replace and would hope that others here will check this.
while ($row = mysql_fetch_array($result)) { $postwords = strip_tags($row[7]); $xbbpostwords = preg_replace('/\[.*?\]/', '', $postwords); // to strip out bbcode $string = $string.$xbbpostwords; }