The unlimited expand ability of your WSN Links allows you to expand and add additional "types" to your categories or links. When you first start with WSN Links you only have a single category type, that is regular. But let say you want to have a webmaster's section to your website and you want to separate the links that are just for webmasters from the rest of your links. This is easy by adding a new category type called webmasters. Check the manual for additional information on how to use and implement this feature of WSN Links.
Now that you are expanding your software and you are making it more useful in the design of your website you have run into your first problem. You have a toplist on you main page displaying the 5 most recently added categories to your directory. But you do not want this toplist to include the new webmasters categories added to your directory.
In your toplist generator you have 3 conditional that you can add to the configuration of your toplist. Here is what the normal config line would look like:
<CONFIG>categories,time,5,descending,,,</CONFIG>Now to have this toplist only show the regular categories and omit the webmasters categories you will go back to your toplist generator and in the very first conditional line you will add
type='regular' . This will produce the following config line for your toplist:
<CONFIG>categories,time,5,descending,type='regular',,</CONFIG>Now only regular categories will be displayed in your toplist.
Let's say you have 3 category types and only want 2 of them to display. For this example you have the 3 category types regular, programmers and webmasters. You want a toplist to display only new categories added to regular and programmers. In the first conditional line of the toplist generator you will add
type='regular' or type='programmers'. This will produce the following config line for your toplist:
<CONFIG>categories,time,5,descending,type='regular' or type='programmers',,</CONFIG>Please make a special note of the configuration line above. The conditionals that you add to your toplist you must type in yourself. The toplist generator will not make corrects for errors that you make in typing in the conditional information. Notice that the category types have
'single quotes
' surrounding them. You will need these in order for your toplist to work. Also notice that while the rest of the config line has no spaces in the line, but when you add the
or to you toplist to include more than one category type you need to have a space before the word
or and after.
Now just for fun lets expand this a little more. You want your category toplist to display the 5 newest categories. You want to limit the category types. And you only want to display categories that have more than 5 links in the category.
This would be your config line for your toplist:
<CONFIG>categories,time,5,descending,type='regular' and numlinks > 5,,</CONFIG> or for 2 category types with 5 or more links:
<CONFIG>categories,time,5,descending,type='regular' or type='programmers' and numlinks > 5,,</CONFIG>
0/5 based on 0 votes. The median rating is 0.