Support MemHT, Vote Now!
MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completelly customizable, expandable and suitable for all needs.
     Site demo
Moderators: mem paulo89 adminik
Page 1/2 1 2 >
RSSReply
Searching in Mylinks
AuthorText
rschley
Junior Member
Avatar

Posts: 24
Contributes: 0

Gender: _MALE_
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!!
Delete Edit Quote
 
rschley
Junior Member
Avatar

Posts: 24
Contributes: 0

Gender: _MALE_
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!!
Delete Edit Quote
 
paulo89
Moderator
Developer

Avatar

Posts: 1042
Contributes: 241

Gender: _MALE_
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
Image
Delete Edit Quote
 
rschley
Junior Member
Avatar

Posts: 24
Contributes: 0

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

Avatar

Posts: 1042
Contributes: 241

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

Avatar

Posts: 1042
Contributes: 241

Gender: _MALE_
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;
        }
}
 
Image
Delete Edit Quote
 
rschley
Junior Member
Avatar

Posts: 24
Contributes: 0

Gender: _MALE_
Online: No
Date: 25/04/2008 17:34
Re: Searching in Mylinks
#post6582
Oh yes, it works Smile

Thank you for your help!

Regards,

Richy
memHT is great!!
Delete Edit Quote
 
paulo89
Moderator
Developer

Avatar

Posts: 1042
Contributes: 241

Gender: _MALE_
Online: No
Date: 25/04/2008 18:07
Re: Searching in Mylinks
#post6583
The welcome Smile
Image
Delete Edit Quote
 
rschley
Junior Member
Avatar

Posts: 24
Contributes: 0

Gender: _MALE_
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:
code
lik($query);


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!!
Delete Edit Quote
 
paulo89
Moderator
Developer

Avatar

Posts: 1042
Contributes: 241

Gender: _MALE_
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.....
Image
Delete Edit Quote
 
Reply
Page 1/2 1 2 >
Tags Cloud
Advertising
News Archive
Language
Help MemHT Portal
Navigator
Search
Users Block
Hi Guest
IP: 38.103.63.60

Username
Password
New files
MemHT Wiki
Friends
MemHT Portal is a free software released under the GNU/GPL License by Miltenovik Manojlo