1
vimana
x-directory hack help
  • 2007/2/20 4:00

  • vimana

  • Just popping in

  • Posts: 20

  • Since: 2005/1/26


I'm trying to make an hack of x-directory module.
but i've something wrong.

I'm very bad in php.
I want display the submitter name too so i added some code in .php viewcat.php index.php singlelink.php.


But the propblem is submitter result all the time = 1 (the webmaster :user=1)


where there are the other fields I added :

$sql = "select l.lid, l.cid, l.title,.....bla bla bla 1.submitter

while(list($lid, $cid, $ltitle, $address, ..... bla bla bla $submitter,



$xoopsTpl->append('links', array('id' => $lid, 'cid' => $cid, 'url' => $url, 'rating' => number_format($rating, 2), 'title' => $myts->makeTboxData4Show($ltitle).$new.$pop, 'address' => $myts->makeTboxData4Show($address),
bla bla bla bla .....'submitter' => $submitter, 'submittername' => XoopsUser::getUnameFromId($submitter),

and I've used this code in templates:

Autor <a href='<{$xoops_url}>/userinfo.php?uid=<{$link.submitter}>'><{$link.submittername}>


Yea I was thinking it was working because i was seeing the username and the link it was working. but now another user post but instead of the right user name i've the webmaster name (user=1) and this: a href='<{$xoops_url}>/userinfo.php?uid=<{$link.submitter}>'> result href='<{$xoops_url}>/userinfo.php?uid=1'>.

I've done some tries (i tryed only the link without username) but submitter result all the time == 1 and i checked phpMyAdmin and in the table submitter is == 6

If i check the user page activity it's right

I totaly don't know nothing about php i hope someone can help me. and thanks in advice.

here a .zip it contains php code, template and phpMyAdmin screenshot:http://www.m0t10n.com/submitter.zip

here the page must have result 6 in submiter:
http://www.m0t10n.com/html/modules/clipsdirectory/singlelink.php?cid=164&lid=1458
the code is the same in siglelink.php, viewcat.php nd index.php

sorry for my english too

:pint

2
vimana
Re: x-directory hack help
  • 2007/2/20 9:36

  • vimana

  • Just popping in

  • Posts: 20

  • Since: 2005/1/26


ok i fixed it
the problem was here :

$sql = "select l.lid, l.cid, l.title,.....bla bla bla 1.submitter

i wrote (one) 1.submitter now i change it in l.submitter and it work

sorry

Login

Who's Online

112 user(s) are online (80 user(s) are browsing Support Forums)


Members: 0


Guests: 112


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits