Random webpage

Started by Delbareth, December 12, 2007, 05:54:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Delbareth

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?  :)
Delbareth
Les MJ ne sont ni sadiques ni cruels, ce sont juste des artistes incompris.

avisarr

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.

avisarr

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.

Delbareth

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.
Delbareth
Les MJ ne sont ni sadiques ni cruels, ce sont juste des artistes incompris.

sid6.7

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


Delbareth

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.
Delbareth
Les MJ ne sont ni sadiques ni cruels, ce sont juste des artistes incompris.

sid6.7

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....



avisarr

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. :)


Delbareth

Hummmm...
Any news of the random button? ;)
Delbareth
Les MJ ne sont ni sadiques ni cruels, ce sont juste des artistes incompris.

avisarr

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.

avisarr

#10
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!

Delbareth

Yeaaaaaaaaaaaah!
It is really great!  ;D
Very good work Dave and thanks a lot!  :D
Delbareth
Les MJ ne sont ni sadiques ni cruels, ce sont juste des artistes incompris.

tanis

hellz yeah david roomes is a genius web guy XD
He who fights with monsters might take care lest he thereby become a monster. And if you gaze long into an abyss, the abyss gazes also into you.

Delbareth

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?
Delbareth
Les MJ ne sont ni sadiques ni cruels, ce sont juste des artistes incompris.

avisarr

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.