| Searching in Mylinks |
| Author | Text |
rschley Junior Member

Posts: 24

Gender:  Online: No |
Date: 24/04/2008 07:51 Searching in Mylinks | #post6468 | Hi,
I would like my visitors to search in Mylinks. Is it possible to change the search page? Edited: 24/04/2008 08:21 memHT is great!! |
|
 |
| |
rschley Junior Member

Posts: 24

Gender:  Online: No |
Date: 24/04/2008 08:25 Re: Searching in Mylinks | #post6470 | I wrote a function for the search page (just changed one of the others and called it lik) and it works but not perfectly. The result gives the right category number but I only get into the overview of all categories.
| code |
function lik($query) {
global $dblink,$results,$fs,$ptitle;
$result = $dblink->get_list("SELECT * FROM memht_mylinks WHERE MATCH(name,description,url) AGAINST('$query' IN BOOLEAN MODE) ORDER BY id DESC LIMIT $results");
if ($result) {
echo "<div><img src='images/bullet_paper.gif' border='0'> <a href='http://www.memht.com/mylinks.html' title='".$ptitle['lik']."'><b>".$ptitle['lik']."</b></a></div>\n";
foreach ($result as $row) {
echo "<div>- <a href='http://www.memht.com/index.php?page=mylinks&op=readmylinks&cat=".urlencode(outCode($row['cat']))."'>".outCode($row['name'])."</a></div>\n";
}
echo "<br>";
$fs = true;
}
}
|
Edited: 24/04/2008 08:26 memHT is great!! |
|
 |
| |
paulo89 Moderator Developer

Posts: 1042

Gender:  Online: No |
Date: 24/04/2008 09:36 Re: Searching in Mylinks | #post6488 | Hum i have to go work now, but later i help you |
|
 |
| |
rschley Junior Member

Posts: 24

Gender:  Online: No |
Date: 25/04/2008 16:25 Re: Searching in Mylinks | #post6579 | I guess I need some help. Can't get it work...  memHT is great!! |
|
 |
| |
paulo89 Moderator Developer

Posts: 1042

Gender:  Online: No |
Date: 25/04/2008 16:27 Re: Searching in Mylinks | #post6580 | oh sorry I forgot to you
I go check function now. |
|
 |
| |
paulo89 Moderator Developer

Posts: 1042

Gender:  Online: No |
Date: 25/04/2008 16:43 Re: Searching in Mylinks | #post6581 | ok test it please
| code |
function lik($query) {
global $dblink,$results,$fs,$ptitle;
$result = $dblink->get_list("SELECT * FROM memht_mylinks WHERE MATCH(name,description,url) AGAINST('$query' IN BOOLEAN MODE) ORDER BY id DESC LIMIT $results");
if ($result) {
echo "<div><img src='images/bullet_paper.gif' border='0'> <a href='http://www.memht.com/mylinks.html' title='".$ptitle['lik']."'><b>".$ptitle['lik']."</b></a></div>\n";
foreach ($result as $row) {
echo "<div>- <a href='http://www.memht.com/index.php?page=mylinks&op=showCategory&id=".urlencode(outCode($row['cat']))."&title=".outCode($row['name'])."'>".outCode($row['name'])."</a></div>\n";
}
echo "<br>";
$fs = true;
}
}
|
|
|
 |
| |
rschley Junior Member

Posts: 24

Gender:  Online: No |
Date: 25/04/2008 17:34 Re: Searching in Mylinks | #post6582 | Oh yes, it works
Thank you for your help!
Regards,
Richy memHT is great!! |
|
 |
| |
paulo89 Moderator Developer

Posts: 1042

Gender:  Online: No |
Date: 25/04/2008 18:07 Re: Searching in Mylinks | #post6583 | The welcome  |
|
 |
| |
rschley Junior Member

Posts: 24

Gender:  Online: No |
Date: 28/04/2008 22:28 Re: Searching in Mylinks | #post6758 | If someone wants to search in "Mylinks" here is what you have to do:
edit the "index.php" in the "pages/search" folder with a text editor.
About line 45 put this one line below:
| code | $row = $dblink->get_row("SELECT titolo FROM memht_pagine WHERE nome='mylinks' AND enabled=1"); $ptitle['lik'] = outCode($row['titolo']); |
About line 75 put this one line below:
| code | case "mylinks": lik($query); break; |
About line 85 put this one line below:
About line 114 put this one line below:
| code | if ($ptitle['lik']!="") { echo "<option value='mylinks'>".$ptitle['lik']."</option>\n"; } |
Go to the end and put this function before ?>:
| code | function lik($query) {
global $dblink,$results,$fs,$ptitle;
$result = $dblink->get_list("SELECT * FROM memht_mylinks WHERE MATCH(name,description,url) AGAINST('$query' IN BOOLEAN MODE) ORDER BY id DESC LIMIT $results");
if ($result) {
echo "<div><img src='images/bullet_paper.gif' border='0'> <a href='http://www.memht.com/mylinks.html' title='".$ptitle['lik']."'><b>".$ptitle['lik']."</b></a></div>\n";
foreach ($result as $row) {
echo "<div>- <a href='http://www.memht.com/index.php?page=mylinks&op=showCategory&id=".urlencode(outCode($row['cat']))."&title=".outCode($row['name'])."'>".outCode($row['name'])."</a></div>\n";
}
echo "<br>";
$fs = true;
}
} |
Don't forget to change www.memht.com with your domain. memHT is great!! |
|
 |
| |
paulo89 Moderator Developer

Posts: 1042

Gender:  Online: No |
Date: 28/04/2008 22:53 Re: Searching in Mylinks | #post6766 | Hi
you don´t need use the full link ^^
Example:
Use only index.php?page=myli..... |
|
 |
| |