KhorasForum

World of Khoras => General Discussion and Questions => Topic started by: Delbareth on December 12, 2007, 05:54:10 AM

Title: Random webpage
Post by: Delbareth on December 12, 2007, 05:54:10 AM
I think one thing could be cool : to have a button which select randomly one page over the billions of the khoras website. ;)
Because sometimes, I have nothing to read in particular, so I read some pages here and there... But I often have the same lectures (my favorites pages/topic and pages closely linked to them) and there are probably a lot of very interesting pages that I will never read this way.
That's why a random button could be useful for those who want to read something without knowing what to read. Am I clear?  :)
Title: Re: Random webpage
Post by: avisarr on December 12, 2007, 06:06:45 PM
That's a great idea! I love it. Let me figure out how to do that and I'll add that button right away. Give me a couple of days.

Ok, where do you think a button like that should go? On the top bar or the side bar? Normally the top buttons are "meta" buttons and have to do with the web site functions and structure and the side buttons are actually content of Khoras. But this button sort of straddles both content and web site layout so it could fit in either place.
Title: Re: Random webpage
Post by: avisarr on December 12, 2007, 11:19:25 PM
Now that I've had a chance to look into this, this might actually take many days to implement. It's not as easy as I had hoped. I did a quick search online. There are some javascript code bits that can do this, but you have to manually type up the list of all possible URLs. Now, that's possible, but very time consuming. Khoras has over a 1000 pages of content. That'd be a 1000 links to type in and update by hand. I'm hoping to find a more automated solution, but so far, no luck.

If, by chance, anyone reading this happens to be a wizard at coding PERL or Javascript or whatever, and you'd like to help, email me privately and let me know. I would love to do this, but don't have the programming experience to pull it off just yet. And I would welcome any help.

So, I'll do research for a few days. If I can't come up with a good automated solution within a week, I'll just use one of the javascript programs that requires a hand coded list and do it all manually. One way or another, we'll have a random page button by the end of the month.
Title: Re : Random webpage
Post by: Delbareth on December 13, 2007, 04:19:13 AM
Coool! I'm glad to see you love this idea! :)
About the location I suggest you put it on the upper part of the side bar. It seems to me that it fits well with the "site map", "homepage", "search" and "main menu" buttons.
I hope you will find a way to do that with little effort.
Title: Re: Random webpage
Post by: sid6.7 on December 14, 2007, 09:53:06 AM
i dont know how to do it myself but,

it would have to be something like putting a search bar on your website where you have something
spider your site..keep a list of those links...then have a button that randomly picks one with every click....

you'd want it on your front page i would think...


if the whole community helped we could each take a section and type up a list of links....that way no one
person would have to do all 1000+...

:o

Title: Re : Random webpage
Post by: Delbareth on December 14, 2007, 01:55:40 PM
That's not a bad idea. Meanwhile I think the main problem is not only to write one time all the adresses but to keep updated one thousand of them.
Title: Re: Random webpage
Post by: sid6.7 on December 14, 2007, 04:01:50 PM
okay maybe found a short cut to writing all those address's...

i use freefind as a search bar on my site: http://www.freefind.com/

once they spider your site...in the admin section of your account
it will list all the (html) links and stuff on your site and provides you
a list you can look at....

all you got to do is copy that list into a text file...then use it
with your php or java or whatever search program your going to
use on the site...to randomly pick one of those listed address's....

it say's it can do up to 3,000 pages for FREE....



should save an hour or two of typeing or copy pasting....


Title: Re: Random webpage
Post by: avisarr on December 15, 2007, 01:18:24 AM
That's excellent. I will bookmark that site and take a look at it.

I also found a coding site that has a PERL script that is supposed to actually scan your site and randomly pick a single HTML page. It is totally automated. I haven't been able to get it to work yet, but I am hopeful it might be the solution I'm looking for. Next week, I'll have a programmer friend of mine take a look and see if we can get it working.

If the PERL script doesn't work, I'll definitely try this site you suggested. So, we have two possible options. I think we'll eventually get this working. A working RANDOM LINK button by the end of the month. That's my goal. :)

Title: Re : Random webpage
Post by: Delbareth on January 27, 2008, 11:55:05 AM
Hummmm...
Any news of the random button? ;)
Title: Re: Random webpage
Post by: avisarr on January 30, 2008, 04:47:36 PM
Still working on it. :-\  Got buried under holiday seasonal stuff, work projects and everything else. I am still hoping to get the automated solution to work. I'll revisit this on the weekend.
Title: Re: Random webpage
Post by: avisarr on February 05, 2008, 08:00:39 PM
Ok, Delbareth... You nudged me and it worked.  :D

I went back and reviewed the idea of adding a "Random Link" button. It's not as simple as I would like and I really hate programming. However, I did find a good compromise that's "good enough" for now. There are many little scraps of codes available on the internet that will do random links in various ways. I found one I liked. It randomly picks a link from any link on a web page. Luckily, I have a web page on Khoras that lists every single page... the Site Map. So, I added that Random Link scrap of code to the Site Map.

Eventually, I want to move that button onto the main menu of buttons or maybe along the top. But in order to put it with the other buttons, I'm going to have to learn more about Javascript code to modify it properly. So, give me some time to figure that out. However, in the mean time, the Random Button on the site map works great. Try it out. It's at the very top of the site map. I just tested it about 40 times and got a different page every time and no broken links.

Enjoy!
Title: Re : Random webpage
Post by: Delbareth on February 06, 2008, 03:44:00 AM
Yeaaaaaaaaaaaah!
It is really great!  ;D
Very good work Dave and thanks a lot!  :D
Title: Re: Random webpage
Post by: tanis on July 22, 2008, 07:16:57 PM
hellz yeah david roomes is a genius web guy XD
Title: Re: Random webpage
Post by: Delbareth on January 23, 2009, 05:16:24 AM
After nearly one year since the "Random Page" button was created, I just wonder about its success.
Concerning myself, I use it very very often.
What about you?
Title: Re: Random webpage
Post by: avisarr on January 23, 2009, 06:57:25 PM
I use it on occassion. To visit parts of the site that I haven't seen in a while. To make sure it's still working. etc. I think it's a success. It does exactly what it's supposed to do and seems to do it well.
Title: Re: Random webpage
Post by: Golanthius on January 23, 2009, 07:10:41 PM
I think its great...I use it everytme I'm on the site (which is quite often).
It shows me sections and pages that I totally forgot were there.
Thanks for putting this feature on the site.