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.
Moderators: Moderators
Page 2/2 < 1 2
Forum RSS feedReply
Mylinks as Directory
AuthorText
paulo89
Moderator
Developer

Avatar

Posts: 1280
Contributes: 517

Gender: _MALE_
Online: Yes

Version: 3.8.1
Country: Portugal
Languages: Portuguese, Portuguese and little english ^^
Date: 28/06/2008 18:15
Re: Mylinks as Directory
#post8942
Hum why u use url?

Try this:
code

$dblink->query("UPDATE memht_mylinks SET hits=hits+1 WHERE id=$id");
 
Delete Edit Quote
 
JPappi
Senior Member
Avatar

Posts: 295
Contributes: 72

Gender: _MALE_
Online: No
Date: 28/06/2008 18:27
Re: Mylinks as Directory
#post8943
Try it at first, i get a count for every link in this cat.
JPappi - have fun with memHT

Project at work: Find-4u.de

Image
Delete Edit Quote
 
paulo89
Moderator
Developer

Avatar

Posts: 1280
Contributes: 517

Gender: _MALE_
Online: Yes

Version: 3.8.1
Country: Portugal
Languages: Portuguese, Portuguese and little english ^^
Date: 28/06/2008 18:35
Re: Mylinks as Directory
#post8944
Change id for fid
Edited: 28/06/2008 18:40
Delete Edit Quote
 
JPappi
Senior Member
Avatar

Posts: 295
Contributes: 72

Gender: _MALE_
Online: No
Date: 28/06/2008 19:16
Re: Mylinks as Directory
#post8946
Frustration, nothing works for me.
JPappi - have fun with memHT

Project at work: Find-4u.de

Image
Delete Edit Quote
 
JPappi
Senior Member
Avatar

Posts: 295
Contributes: 72

Gender: _MALE_
Online: No
Date: 29/06/2008 11:25
Re: Mylinks as Directory
#post8964
Has anyone a solution for me.I cant figure it out how it works for me, cause i'm not a php developper.
The only thing i get is a count for all links in the category. How can i select the clicked url?
- $dblink->query("UPDATE memht_mylinks SET hits=hits+1 WHERE id=$fid"); -
in function showCategory.
Do i need a new function, cause the update runs in a loop?
Edited: 29/06/2008 11:25
JPappi - have fun with memHT

Project at work: Find-4u.de

Image
Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

Avatar

Posts: 5118
Contributes: 2461

Gender: _MALE_
Online: No
Date: 29/06/2008 16:17
Re: Mylinks as Directory
#post8971
You should put that code in the foreach statement where links are shown (at row 105)

$dblink->query("UPDATE memht_mylinks SET hits=hits+1 WHERE id=$fid");

So this should be the result:

code
//Show links
if ($fresult = $dblink->get_list("SELECT * FROM memht_mylinks WHERE cat=$id AND flag=1 ORDER BY id DESC LIMIT $ofsbgn,$ofsppg")) {
        foreach ($fresult as $frow) {
                $fid = intval($frow['id']);
                $fname = outCode($frow['name']);
                $furl = outCode($frow['url']);
                $fdesc = outCode($frow['description']);
               
                $dblink->query("UPDATE memht_mylinks SET hits=hits+1 WHERE id=$fid");

                $row = $dblink->get_row("SELECT COUNT(id) AS num_votes, SUM(vote) as tot_votes FROM memht_ratings WHERE whr=7 AND wid=$fid");
                $tot_votes = intval($row['tot_votes']);
                $num_votes = intval($row['num_votes']);

Edited: 29/06/2008 16:18
Delete Edit Quote
 
JPappi
Senior Member
Avatar

Posts: 295
Contributes: 72

Gender: _MALE_
Online: No
Date: 29/06/2008 18:05
Re: Mylinks as Directory
#post8976
Sorry mem, dont works.
Now, using the original index.php from download 3.8.5
Nothing modified, only the update query.
This cat contains 8 urls, and every url is updated if i click one url.
Result is attached.
Attachment: UO0010.jpg
JPappi - have fun with memHT

Project at work: Find-4u.de

Image
Delete Edit Quote
 
Reply
Page 2/2 < 1 2
Tags Cloud
Advertising
News Archive
Language
Help MemHT Portal
Navigator
Users Block
Hi Guest
IP: 38.103.63.59

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