Webmastersite.net
Register Log In

Need a bit of help
I seem to be having a problem with using aliases

Comments on Need a bit of help

CelticTiger
Beginner

Usergroup: Customer
Joined: Aug 04, 2005

Total Topics: 1
Total Comments: 2
Posted Aug 09, 2005 - 8:41 AM:

First I'd like to say that this is great script and I love tinkering with it smiling face

I seem to be having a problem tho and I'll try to explain it as best as I can.

Anyway I have a number of categories and two or three subcategories in each and 1000's of links in each subcategory which I added using phpmyAdmin using the "Insert data from a textfile into table" tool that it has. I haven't added any links to the actual categories themselves and now that I have all my links in I realise that I would like the categories to display the contents of the subcategories .ie I'd like a Category named "Widgets" to display the links which are in the subcategories "Red Widgets" and "Blue Widgets".

I tried to use the "Advanced Options" tool to add aliases ie. "For all categories, set alias to 1 where the current id is 2". Where '1' is the main category and '2' is the subcategory.This makes the links in whichever subcategory disappear and I can't seem to get them to show again unless I delete the subcategory and recreate it and add the links in again.

Maybe I don't fully understand how to use aliases or I am missing something completely (wouldn't be the first time lol)

If anyone can shed some light on what I'm doing incorrectly and what I should be doing I would be grateful.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 09, 2005 - 11:04 AM:

It's the 'advanced options' page for a reason, you're killing the directory when you do that. Reset the alias field to be blank everywhere (you may need to use phpmyadmin to do that, not sure if advanced options handles blanks). Aliasing is done by editing a link and selecting the categories you want it aliased to, then submitting your edit. You can't alias more than one link at a time.

To show all the contents of subcategories within the main category, you could use a toplist of links where catid = {CATID} or parentids LIKE '%|{CATID|%'
It might be a better idea though to reconsider why you're making subcategories, and put everything in the main category (without creating any subcategories) and use filters to show only red or only blue widgets.
CelticTiger
Beginner

Usergroup: Customer
Joined: Aug 04, 2005

Total Topics: 1
Total Comments: 2
Posted Aug 09, 2005 - 1:19 PM:

Thanks for clearing that up Paul....I'll try what you suggested.
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Aug 14, 2005 - 11:12 PM:

Hey Paul,

Let me jump in here, so I don't have to open a new post for this.

links,type;time,10,ascending;descending,catid={CATID} OR parentids LIKE '%|{CATID}|%',,,0,0,0,0

That's what I have to display the links for all subcategories in a specific category. But I made the toplist multipage. When I click on the 2nd page, I get:

Load time so far: 0.13 seconds.
Performing query: SELECT id,name,parent,validated,description,time,parentnames,parentids,numlinks,hide,lastlinktime,custom,lastedit,moderators,headerinfo,related,numsub,type,permissions,subscribers,subscriber,mixtypes,isalbum,orderlinks,totalcomments,ulsearchmax,ulsearchquery,ulsearchadult,alias,catcols,linkcols,dmozpath,sponsorlinks,views,customwrap,deleted,reqlinks,reqcoms,reqlinksdelay,priority,levelsdeep,lastposterid,lastpostername,lastcommenttime,lastthreadid,lastthreadtitle,linkshere,unvalidatedlinks,unvalidatedcomments,actaslink,countposts FROM wsnlinks_categories WHERE validated=1 AND deleted=0 AND hide=0 ;

Number of rows is 73 for Resource id #45

Load time so far: 0.15 seconds.
Performing query: LOCK TABLES wsnlinks_email WRITE, wsnlinks_links WRITE, wsnlinks_categories WRITE, wsnlinks_members WRITE;

Load time so far: 0.15 seconds.
Performing query: SELECT id,`to`,subject,message,headers,replacement,mime FROM wsnlinks_email WHERE timesent=0 ORDER BY id ASC LIMIT 0,10;

Number of rows is 0 for Resource id #46

Load time so far: 0.15 seconds.
Performing query: UNLOCK TABLES;

Load time so far: 0.15 seconds.
Performing query: SELECT id FROM wsnlinks_sessions WHERE id=1 ;

Number of rows is 1 for Resource id #48

Load time so far: 0.16 seconds.
Performing query: UPDATE wsnlinks_members SET inactive='1' WHERE time < 1092550271 AND lastvisit < 1092550271;

Load time so far: 0.16 seconds.
Performing query: UPDATE wsnlinks_members SET inactive='0' WHERE inactive = 1 AND (time > 1092550271 OR lastvisit < 1092550271);

Load time so far: 0.69 seconds.
Performing query: UPDATE wsnlinks_settings SET content='1124086272' WHERE name='staticexporttime';

Load time so far: 0.69 seconds.
Performing query: UPDATE wsnlinks_categories SET views='104' WHERE id=41;

Load time so far: 0.69 seconds.
Performing query: SELECT id,name,parent,validated,description,time,parentnames,parentids,numlinks,hide,lastlinktime,custom,lastedit,moderators,headerinfo,related,numsub,type,permissions,subscribers,subscriber,mixtypes,isalbum,orderlinks,totalcomments,ulsearchmax,ulsearchquery,ulsearchadult,alias,catcols,linkcols,dmozpath,sponsorlinks,views,customwrap,deleted,reqlinks,reqcoms,reqlinksdelay,priority,levelsdeep,lastposterid,lastpostername,lastcommenttime,lastthreadid,lastthreadtitle,linkshere,unvalidatedlinks,unvalidatedcomments,actaslink,countposts FROM wsnlinks_categories WHERE alias=41 ;

Number of rows is 0 for Resource id #51

Setting cookie with name cathits, value 41 and duration 1124086332

Load time so far: 0.69 seconds.
Performing query: SELECT id,name,parent,validated,description,time,parentnames,parentids,numlinks,hide,lastlinktime,custom,lastedit,moderators,headerinfo,related,numsub,type,permissions,subscribers,subscriber,mixtypes,isalbum,orderlinks,totalcomments,ulsearchmax,ulsearchquery,ulsearchadult,alias,catcols,linkcols,dmozpath,sponsorlinks,views,customwrap,deleted,reqlinks,reqcoms,reqlinksdelay,priority,levelsdeep,lastposterid,lastpostername,lastcommenttime,lastthreadid,lastthreadtitle,linkshere,unvalidatedlinks,unvalidatedcomments,actaslink,countposts FROM wsnlinks_categories WHERE parent=41 AND validated=1 AND hide=0 AND deleted=0 AND isalbum=0 ORDER BY numsub DESC LIMIT 0,300;

Number of rows is 15 for Resource id #53

Load time so far: 0.87 seconds.
Performing query: SELECT COUNT(id) FROM wsnlinks_links WHERE catid=41 AND hide=0 AND deleted=0 AND validated=1 ;

Count is 0

Fatal error: Unsupported operand types in /home/anmlmdirectory.com/public_html/index.php on line 401

===================

Line 401 in index.php is:

$start = ($page * $perpage) - $perpage; // have to adjust for starting the numbering at 1
$end = $start + $perpage - 1;

Did I do something wrong here?

Thanks
David
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 15, 2005 - 5:17 PM:

Well in order to evaluate that I would have to see the url, to know what values of for example page and perpage are being passed to that page.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.