Blogs Made Simple - Searchable by the Search Module - Help Please
Blogs Made Simple - Searchable by the Search Module - Help Please
Hello,
(I searched the forums but couldn't find anything to address this.)
I am using CMS 1.5.3
Posts in Blogs Made Simple are not being indexed for the search. Is it possible to have them indexed by the Search module?
I see that the description for the Search module says "core" content along with certain modules. But then it doesn't say which ones or how to find out which ones are supported.
If it is possible to have the posts from Blogs Made Simple indexed in the search, what do I have to do?
Thanks for any help.
(I searched the forums but couldn't find anything to address this.)
I am using CMS 1.5.3
Posts in Blogs Made Simple are not being indexed for the search. Is it possible to have them indexed by the Search module?
I see that the description for the Search module says "core" content along with certain modules. But then it doesn't say which ones or how to find out which ones are supported.
If it is possible to have the posts from Blogs Made Simple indexed in the search, what do I have to do?
Thanks for any help.
Last edited by chandu on Mon Mar 30, 2009 3:47 am, edited 1 time in total.
Re: Make Blogs Made Simple Searchable by the Search Module
Thanks for the response.
In the Help is says:
(optional) modules="null" - Limit search results to values indexed from the specified (comma separated) list of modules.
So I tried {search modules="Blogs"}
Still didn't work. Any other ideas?
I'm thinking that the Blogs module is not by default index-able by the search module. But I would think that there was a way to do it. I could be wrong.
I tried doing that with the "module" parameter.mark wrote: I believe you can target a module specifically, look in search Help for parameters...
In the Help is says:
(optional) modules="null" - Limit search results to values indexed from the specified (comma separated) list of modules.
So I tried {search modules="Blogs"}
Still didn't work. Any other ideas?
I'm thinking that the Blogs module is not by default index-able by the search module. But I would think that there was a way to do it. I could be wrong.
Re: Make Blogs Made Simple Searchable by the Search Module
So anyone have any ideas for this?
Re: Blogs Made Simple - Searchable by the Search Module
If the default Search Module cannot search the Blogs, is there another option?
-
AlienatedNZ
- New Member

- Posts: 4
- Joined: Mon Nov 03, 2008 11:10 pm
Re: Blogs Made Simple - Searchable by the Search Module - Help Please
Anyone have an answer yet?
-
bullitshot
- Forum Members

- Posts: 57
- Joined: Mon Mar 23, 2009 11:35 am
Re: Blogs Made Simple - Searchable by the Search Module - Help Please
Hello!
I am having the same problem. I have tried a lot of things but it just won't work.
Anyone got an idea?
Is there another search module for cmsmadesimple?
thanks!!
I am having the same problem. I have tried a lot of things but it just won't work.
Anyone got an idea?
Is there another search module for cmsmadesimple?
thanks!!
Re: Blogs Made Simple - Searchable by the Search Module - Help Please
I'm going to guess that it's not possible. I hope I'm wrong.
But if it's a matter of the module having to "register" with the search module, does anyone know what that would entail?
Is getting the Blogs Made Simple module registered with the Search module a difficult task?
But if it's a matter of the module having to "register" with the search module, does anyone know what that would entail?
Is getting the Blogs Made Simple module registered with the Search module a difficult task?
-
khalistoo
Re: Blogs Made Simple - Searchable by the Search Module - Help Please
Same here, i having the same problem but i don't think it should be an issue in the module behavior to actually indexed the content of another module such as Blogs, if anybody from the dev team of this project have a need of info or anything please feel free to ask
Re: Blogs Made Simple - Searchable by the Search Module - Help Please
Yes it can be done, it is a few line hack that you have to put into the code, since hacking the code will stop the forum from being able to help you, I would suggest you take a look at CGBlog which has that built in.
Take a look at CGBlog (that will give me time to look it up) and if you still want to hack the code I will tell you where.
Jeff
Take a look at CGBlog (that will give me time to look it up) and if you still want to hack the code I will tell you where.
Jeff
Re: Blogs Made Simple - Searchable by the Search Module - Help Please
Hi,
I have the same problem and I´d like to stay with Blogs Made Simple. Can you pls put here the code and explian how to fix this problem?
Thx very much, P.
I have the same problem and I´d like to stay with Blogs Made Simple. Can you pls put here the code and explian how to fix this problem?
Thx very much, P.
Re: Blogs Made Simple - Searchable by the Search Module - Help Please
In /modules/Blogs/action.addentry.php replace line 90 with the following.
I updated my BlogMS versions so I lost what I had originally. This adds it to the search module database but I can't figure out why the search form won't return the item.
Warning... This is hacking the module files and making the change will make them nolonger be supported.
Code: Select all
if ($result)
{
$message["module_message"]=$this->Lang("newentryadded");
//Update search index
$module =& $this->GetModuleInstance('Search');
if ($module != FALSE)
{
$content = '';
$content .= $text.' '.$title.' '.$title;
$module->AddWords($this->GetName(), $entryid, 'blogentry', $content, NULL);
}
}
else
{
$message["module_error"]=$this->Lang("entryaddederror");
}
Warning... This is hacking the module files and making the change will make them nolonger be supported.
Re: Blogs Made Simple - Searchable by the Search Module - Help Please
To return and show results in search form insert in /modules/Blogs/Blogs.module.php this code at the end of file (before the last "}"):
and instert at the end of function DeleteEntry this code:
This works for me with two limitations. The first one - the comments are not indexed and searchable, and the second one - if a blogentry is deactivated, search db must be reindexed in admin Search module menu to obtain correct results.
Code: Select all
function SearchResult($returnid, $articleid, $attr = '')
{
$result = array();
if ($attr == 'blogentry')
{
$db =& $this->GetDb();
$q = "SELECT title FROM ".cms_db_prefix()."module_blogs_entries WHERE
active = 1 AND id = ?";
$dbresult = $db->Execute( $q, array( $articleid ) );
if ($dbresult)
{
$row = $dbresult->FetchRow();
//0 position is the prefix displayed in the list results.
$result[0] = $this->GetFriendlyName();
//1 position is the title
$result[1] = $row['title'];
//2 position is the URL to the title.
$aliased_title = munge_string_to_url($row['title']);
$prettyurl = 'Blogs/' . $articleid.'/'.$returnid."/$aliased_title";
$result[2] = $this->CreateLink('cntnt01', 'detail', $returnid, '', array('articleid' => $articleid) ,'', true, false, '', true, $prettyurl);
}
}
return $result;
}
function SearchReindex(&$module)
{
$db =& $this->GetDb();
$query = 'SELECT * FROM '.cms_db_prefix().'module_blogs_entries';
$result = &$db->Execute($query);
while ($result && !$result->EOF)
{
if ($result->fields['active'] == '1')
{
$module->AddWords($this->GetName(),
$result->fields['id'], 'blogentry',
$result->fields['title'] . ' ' . $result->fields['text'],
NULL);
}
$result->MoveNext();
}
}
Code: Select all
//Update search index
$module =& $this->GetModuleInstance('Search');
if ($module != FALSE)
{
$module->DeleteWords($this->GetName(), $entryid, 'blogentry');
}
