User:Jimkloss/sandbox
From WWR
Purpose
This is my personal but public page where I'm keeping track of stuff I'm doing. If you want to know what's on my personal to-do list when it comes to programming, feel free to poke around and/or add comments. Just don't expect much of a response. And since it's my own list, it will have my personal shorthand etc. in it. Please don't ask for clarification unless you think you can really help with something it looks like I'm struggling with. Thanks.
2007 "Get Back On The Horse" To Do List
- Wheat Palace
- Jim - you have to do this stuff and get the damn place 'done'. At least enough to start holding classes and hosting events. Really. You have to make this happen or else you will be continue to be paralyzed and afraid to move forward. Please do this shit. For real.
- call Louden and prioritize that
- call the electricians back and get over having to pay them $100 to drive here
- call D&S etc. about getting a new septic put in
- call a new plumber to finish installing fixtures
- call Dave / Mike / Brendon / Troy / ??? about coming over to maybe design or put up shelving, etc. help figure out some way to store stuff, closets, tool shed etc.
- after Loudon, call Gery immediately to get the floor going
- Permission to play royalty-free page
- with artist name on URL, make wwr_variable(s) that
- print out artist's songs in library
- print out agreement section(s)
- print out privacy policy
- have 'fill-in the blanks' form fields for name, email, physical address & phone and relationship to artist
- has submit button
- electronic signature - MAKE IT AS EASY AS POSSIBLE - point, click, you're done
- GET ARTIST FEEDBACK - ask for good stuff, print it on the page for other artists
- SIMPLIFY THE LEGALISE? or at least have a English easy-to-read translation
- perhaps a link to a page where I diatribe about the pro's/soundexchange/riaa and how they treat WWR and our history with them
- contact EFF to see if they would be willing to back us up on this??? Or, since I *hate* that kind of thing personally, get a qualified and eager volunteer to do it
- check out LastFM agreement as it is royalty free (although on-demand): http://labels.last.fm/admin/register/?#
- with artist name on URL, make wwr_variable(s) that
- Wheatstalk
- contact Antje Duvekot and/or have volunteers do the same to see about getting her to come by, otherwise, notify Rick etc. that we might caravan to come see her, other performers at songcamp (if it's that week)
- contact all Alaskan artists and/or have volunteers do the same to notify and invite them
- contact Sandra/Paul about group discounts for flight tours or some sort of trade???
- Programming
- crosscheck wiki users table with the song rankings and pull those rankings where the user was deleted
- Jasper needs to check CDBaby/LastFM again after queuing music (or have the check program do it - somebody needs to do it)
Stuff below this was added before the bubble burst. So, I'll put it on the horse's back when I can. That I can even come to this page and begin to consider doing all the work that needs to be done is, for me, a big step forward.
DO NOT FORGET
- RickHap's idea to invite Derek Sivers to Wheatstalk 2007. Seminar?
- resource for geolocation (from wikipedia): http://www.dnsstuff.com/tools/city.ch?ip=64.122.206.226
- http://www.musicbizacademy.com good resource for lots of indie music stuff - potentially write after moved to Palace and let him know about WWR / wiki
- whatever the hell is causing artist website to default to google instead of picking up the one entered by users, fix it.
- allow "apply this tag to all tracks for this particular album" ala your control panel in the old days
- consider something special when someone with a blank User: link makes requests encouraging them to set up a user page so we all can know something about them?
- Need a macro to display random photo from WWR collection (thumbnail) for example on the main page (ala left upper screen "Taken at WWR Today") to show the human side of WWR
- For the theme= pages, would be nice to request X minutes of songs that match that theme/genre/featuring etc. i.e. a quick link to request songs with something in common
- Think about adding 1/2 stars for the star display to provide more resolution as a huge percentage of songs show as 5 stars
- allow add SPAMMER text to database and use it in silupdt to filter chat lines
- on artist's page and elsewhere, create a star rating for how the listener ranks this particular artist (as per all their rankings for the artist)
- listener comments on each song in easy format for inclusion on artist's / song / album pages
- a way to request a show of stuff that X listener (including self) has never ranked
- show artist's sex on edit tags page, maybe location too etc. so easy to change it on one page in various places
- some sort of 'lock' on tags so those put in by 'trusted' people (or artist?) cannot be changed without human intervention - i.e. trusted taggers designation
- ability to increase/decrease ALL of your ratings by X stars i.e. change all your 5 stars to 4 stars, 4 stars to 3 stars, etc. or some way that you can personalize the way you want to rank music so you can change your designations at a later date (i.e. I now want to give 3 stars instead of 4 for just about everything, saving 4 and 5 stars for the really special stuff) - 3 stars should probably be the new 'average' rating instead of 4 stars.
In progress
- report of songs with no keywords/most keywords/etc.
- fix artist DB to have gender/location / get from CDBaby query / pre-populate gender keyword based on artist gender / figure out how to do request show on location not in keywords but in artist DB
- add song comments - need to redesign and clean up old DB
- find out if can get sysop status from wiki db and if so (YES), then free up the "lock IP" command so others can run it
- look at jasper and take out old code, determine what to keep and either re-write or put in repository to come back to later(semi-done)
Higher priority
- if album is on CDBaby, provide (and push) a direct link to the "Review This CD" so listeners can write reviews that actually help sell CDs for artists
- artist DB could have a field for "Sounds like" like CDBaby (maybe even get theirs?)
- emoticon descriptions - update when new ones uploaded - list those with no descriptions
- anon chat - look up geoip - block if korea etc.
- do CDBaby sales page to replace one on the old system
- if system load is high on entry, then message can't do now ...
- add "how long been listening and what with" to the misc section of user's detail page
- a way to refer to a fixed song ID(?) that would dump everything about that song (including being able to request it) so people could put in links to individual songs (and requesting them) on individual pages)
- allow access to Musi-cal live performance gig info both on artist pages and user pages if they give a location/zip code(?) or on a generalized page sorted by location / artist
- see if you can set default skin for new users on wiki and maybe set some of their wiki preferences to a reasonable default (i.e. ignore minor edits in Recent Changes etc.)
- geolookup broken - determine how you want to use it with V4
- work on the code to allow clickable "When" field in chat that opens new window and centers chat display on that particular comment so people can click a chat line and see it in context
- add system variable like $wwr_user_listening(display_if_yes|display_if_no) then use it on user page template. Potentially think about the same or a similar variable being usable in templates to control what templates do; i.e. if_user_listening_then display this block of stuff _else_ display this block of stuff. Probably overkill, but might be nice to not display a 'suggested request' user would like if they are not listening. Regardless, a way of allowing a little bit of template control based on system variables would be very useful(?). Another example: if_system_load(<3) do this block of code _else_ do this block of code.
- add to user pages: total songs ranked/first date appeared in chat/last date appeared in chat/fields from wiki db for last touch, etc./scan other tables for interesting data
- put keywords/listener comments/freeform keywords on song pages
- And while you're at it, why not do some more stats (or link to "Detailed Stats") so you can replace the daily artist email etc. with a link to artist's page. Let's get this puppy out there and in the hands of the muscians okay? And while you're at it, make sure and send a mass email to artists with links about how to edit etc. .... oh, and make sure you speed up stats on Artist's pages so you can take 1-2,000 hits in a day.
- put results of fanlist lookup on currently playing song that requires intensive CPU into a 'current results' table - reset/rebuild table whenever ranking is done to keep it current - or, put it in the song db (probably better so can group songs by fans) ala old system
- lots-o-bug fixes including those on Bugs and Feature Requests
- lock artist's email from being used in templates (if you're reading this and wondering why, we never put artist's email address on a static page, only on "What's Playing Right Now" to keep email-addy-spam-harvesting bots to a minimum - artists trust us with their direct email addresses)
- list of Artist's Of The Day coming up (and select box for me)
- new date formats for signatures, auto-signatures if can figure out how (doubtful since where to stick 'em would require a lot of AI that I don't care enough about) ... test being able to use ::emoticon format anywhere in the system - it should now be possible which means we could get rid of the emoticon tags
- automate audmags again - please please please make it as easy and carefree as possible so they can be sent effortlessly
- chat search
- hook the EJs into at least their page, then maybe a page for "What Just Played" history. Dunno yet.
- When more important stuff is done, take a look at a new database for just V4 tables. Consider keeping some of the calculated fields that take so much CPU in a table and updating only when user ranks song or does something else that would require an update. Would really cut down on CPU usage.
- allow users/artists to upload artist photos, change song/album names / add artist spotlights
- REPORT to show number of songs each user has ranked/tagged etc. to encourage users to rank/tag songs and get on list
Lower priority
- playlist history page with something like 'today' then collapsed entries for every day back in time
- insert "on demand" requests between blocks of music?????? re-write EJ code completely
- music classification - there has to be a brainstorm here - perhaps pre-selected categories to match certain 'music shows' or something - the old system works and should be allowed for in some form (free-form data entry???) but you have to do something to encourage listeners to classify music so we have better blocks of music
- install newer version(s) of ezsql.php and wiki
- a variable listing those people in chat in the last X hours i.e. wwr_chatted_today((24,,These people chatted today: wwr_username))
- EJ code:
- occasionally read the request dedication before the song
- suck in new ranking database and phase out using old one
- EJ needs to be able to read wiki pages and take action based on them
- checkbox to allow people to 'delete' (i.e. make invisible - I don't delete anything) their own comments from their user details page
- now that we have an Albums: namespace, you need to add the code to allow dumping info about a particular album and not just ALL ALBUMS by an artist
- get 1.6.3 and see if it fixes what they broke in 1.6.1 with tags
- how about an 'over-requested' button that can click? Once clicked, a 24-hour request block on that artist is put in place. Keep track of total 'over-requested' counts so artists who push themselves would hopefully see it. At a certain point, begin blocking requests for overrequested stuff more harshly.
- stop the wiki db user lookup in who's listening on each load of page and make it ejs responsibility to lookup once on song change and record in listeners db
- now that you're definitely sure(?) you can't integrate photos directly, think about coding an EJ routine that will fake off being a browser to send photos so that the photo system is fully integrated. Consider shutting down local FTP server as it no longer serves a purpose since photos are now listener uploaded. Learn more about galleries and how they could help organize the massive photo collection we already have.
- "last seen" etc. back into chat
- recode Jasper to use new site rankings and consider quickies for EJs to be able to figure out what's the latest on the site and talk about it on-air ... and think about how to unobtrusively integrate them back into the human chat(?)
- turn the friggin' EJs into Eliza. Let them do semi-intelligent things (horoscopes, music requests, advice, etc.) based on what anyone who's in their chat room is asking them to do or talking to them about
- figure out wheat berries, hot biscuit and any other community-based games - should be lots of possibilities with the wiki - imagine hiding a wheat bun somewhere in the system and giving berries to the first person to find it! Fun!
- prepopulate emails to artist saying "I just heard xyz on WWR and....."
- get http://www.php.net/manual/en/function.get-browser.php
- maybe wheatberries in the chat and / or something completely different with them
- emoticon cheat sheet report / java to pop them into chat input box
- look at feasability of auto-signing talk pages. Would be difficult to sign the correct place, so maybe not. But maybe just a section at bottom of "recent writers" etc. Dunno.
- re-do the musi-cal database and allow that data to be snarfed via system variables
- remember to go back to EditPage.php and look at global $wgLivePreview, $wgStylePath; to see if you can get a auto-preview when adding a new page
2007 Stuff
- CDBaby now has the CD's UPC code in the RECORD LABEL field - could break it out and make it a clickable item in wwr wiki so buyers could quickly find http://www.google.com/search?q=783707358123&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
Stupid ideas
- Start and promote a page something like "101 Interesting Things About Wheatheads You Were Afraid To Ask" - public place to ask fun and interesting things (I suppose it'll quickly go gutter) of listeners. Like from Sparkit "Does Adobe give you free copies of software you beta test for after the test is over?" And from J-Walk "Do you have to know sentence structure like object and noun and all that stuff to be a technical book author?" since I think I hallucinated he said something about Jimbob being an 'object' somewhere on the site. For Cub Driver and other pilots "When did you first fly an airplane" and "Do you get scared when something out of the ordinary happens when you're flying or do you immediately consider it a challenge that you'll definitely overcome?" The list can go on and on and be both fun and useful once a listener cares to identify what they do for a living. Probably a real dumb idea.
- Utilizing mediawiki's software as the main engine behind the site actually opens up the real possibility of my releasing the source code for my 'hooks' into the wiki. (Compared to their code, mine is a snap to figure out and stands up reasonably well in efficiency and logic.) This would allow others to fix bugs, add significant enhancements, and generally keep the system running when I finally retire on Maui with the vast accumlated wealth this site has brought me. Nah, the real reason is that I've had probably 10-15 serious inquiries over the years from qualified programmers wishing to contribute. It always pains me to tell them 'not yet' when I know damn well the answer is 'probably never' ... not because I'm a code snob but because having released code to the public before (Nochange BBS I learned firsthand that you quickly morph from being a developer to being a tech-support person, spending most of your time answering questions about how the code works instead of writing new and fun stuff.
In the short-term, there's nothing stopping a real geek from reading about mediawiki tag extensions and writing code for WWR to use it ala
Stuff That's Done
How to preload a new page ... will use for Artist pages I think
Add "&preload=
- http://en.wikipedia.org/wiki/Wikipedia:Village_pump_%28technical%29#Pre-populating_a_new_page - keep looking for a response
Jim, there are some links here that may help. It's way over my head, but it will make sense to you. BTW, thanks for the house concert DVDs! --J-Walk 14:13, 18 March 2006 (AKST)
Thanks - you're welcome. Got it figured out.
- write the extentions that will allow this page to have stuff like album, song titles, webpage, photo, etc. already filled in
- system variable for refresh
- gotta get the javascript crap (to REFRESH and capture clicks) back into pages that use variable substition ... or better yet, see if can add easily to all wiki pages without disrupting their code custom java goes in skins/common/wikibits.js
- provide an automatic google search link for the artist
- There has got to be a simple way to write a new page from within PHP. Need to keep checking for a response.
- gotta figure out how to preserve a special WWR system variable so that it is dynamic and only filled in when page is displayed and NOT during edit ... so when go to an Artist's page, it fills in what is currently active in WWR music library (rankings, tracks, etc.) but does NOT get filled in when user is editing page
- now that you have the basic tools, think about how artist pages get built with hardcoded variable that displays dynamic info on them ...
OR LEARN HOW TO DO A NEW NAMESPACE FOR ARTISTS ONLYuse new Artists namespace (good!) and whenever a page is loaded, jump in and throw the db stats on it regardless of what else is there - yeah, that might be the best alternative (no having to teach artists, page is 'pre-built' even if non-existent but doesn't clutter if no one never actually creates it - build rudimentary chat page ala the old method. Forms. Checkboxes. Keep external dbs from wiki. Dyanmic page that just happens to look like a wiki page but won't have any of their functionality (that didn't take too fuckin' long did it? ROTFL)
- got to do requests now - gotta think about how to approach it
- requests - form or URL? URL is easier and could take to a page with request queue. But would require a click for each request instead of being able to make 3-4 at a time. Maybe that's a good thing.
- gonna have to take a long look at Inputboxes and how I can modify that code to start allowing users to enter stuff and save it in WWR databases. So, for example, a user could enter their current status in a box, and it'd get saved automatically on either a "What everyone's status is" page and /or their personal sandbox page. Obviously, would also be used to request songs, rank songs and do everything else where we need input from the user. Once that's done, we have a fully functional website and not just a wiki
- ranking would be the next big prototype area
- give 'em every friggin' possible data value in the world in system variables, including all the wiki stats etc. Overdo it and see what they do with em!
- continue on with new system variable conversions. oh yeah, it was artist db dump, sorted etc. in your debug template.
- 8-ball in the chat
- ::helloall in the chat
- EJ upload photos directly to chat? Link to photo just uploaded with thumbnail? Dunno.
- Have the EJ do minimal announcing in chat but basically just point to pages with the full info.
- images need better tags ... see if you can get in there and fix the wiki ones
- images should be allowed as part of hyperlinks ... see if you can get there and fix the wiki ones
- start testing having Jasper be able to muck around in the wiki. Would like to have random photos come up on the main page ala Photo Of The Minute. Also would be major cool to have EJs able to write to their own page as they are doing their show. Oh - can already do that through mySQL database huh?
- a 'synch to the music' audio-lagtime button.
- page with overall rankings - requests enabled
- after requests, get back to the database dump prototypes - just any basic report etc. - need search artist, album etc linked to requests
- people's home pages have their favs list - requests enabled
- more 'lists' including "What's New" latest artists / albums added to music library (finally!)
- music db page that is totally searchable - requests enabled
- search page for requests, but more importantly, 'smart' requests (including potential 'smart' requests from within chat) where you can say "Play something that Sol would like" or "play something that based on my previous opinions I'll like but haven't heard yet" or "play something that will appeal to the broadest number of people who are actually tuned it" etc. - make it simple to request great (and otherwise unheard) music easily
- see if you can jump in on the CSS file loads so that users can customize background colors, fonts, etc. and you can send out the appropriate CSS style
- fix the damn 1.6.1 bug - test case: http://www.wholewheatradio.org/wiki/index.php?title=Artists:Plum_Tucker&action=edit&preload=Template:New_artist&artistnum=4176 Confirmed wiki bug: http://bugzilla.wikipedia.org/show_bug.cgi?id=5476
- max 2 requests by same artist within X hour period - got another abuser requesting 4-5 tracks of themselves once/twice per day when they aren't even listening
- butthead - if there ain't a CDBaby link on the artist's page, how you expect 'em to buy CDs and support the artist? Top priority.
- easy one for today I think ... wwr_user_last_chat(10) would show last 10 lines user said in chat. allow for wwr_user_last_chat(EJ) for any EJ also. Just br separate them for a quickie. Or frig, use the stupid 'loop' structure if you need to. Should already be written somewhere. In fact, this whole variable sounds familiar???? Which means you really need to update the System Variables page as you can't keep track of them yourself anymore.
- Okay, think about this for song keywords/comments/etc. Click a song. A page opens (just like for artists) that shows all the data for the song length, last played, etc.), keyword CHECKBOXES (for known keywords like jazz/mood=happy/acoustic etc.), listener comments about that song, and a 'free-form' edit box for associating words with the song. IOW, just like an artist's page. Of course most songs wouldn't have any data except WWR supplied data, but would be cool to have google link to song title, etc. cuz might get to lyrics or tab or original artist easily. Yeah, nice. Only thing is, then whenever a song title appears anywhere on the system (like on the artist's page as it does now) you either need to make the default click on songtitle go to it's page (where you request from) or else add a new column/new "Request It Now" link to separate the two links. "Request It Now" is probably better as can either appear or not in a column based on current requestability. Yeah. Holy shit. I think that's the new 'song page' design.
- although I'm not crazy about the idea, it makes logical sense to add an "Albums" namespace that acts the same as Artists: and Songs: namespace so you can click on an album name and see all the tracks for that album. Yeah, it's gotta happen just for consistency and because some people will probably find it useful
- create $wwr_chat_dump(today|yesterday|x days/hours/lines back || chat_room || who?) type variable so can put old-style "chat for last 24 hours" back in place (just did RANGE=x hours - will do USER etc later as needed)
- hey asshole, you really need to add "What's coming up" so people can see what will play during the hour ... then have wwr_show_name link to it
- when you dork with the chat page again to allow more on-screen variables (i.e. checkbox to turn on/off EJ monitoring) think about resurrecting the old code to stop auto-reload once per hour. It's very easy under a tabbed browser to accidentally leave the chat window open in a non-active tab for hours and never look at the output. Coded as: Logged in user: has to manually hit Refresh once per hour Non-logged in user: has to hit manual refresh during the 3 minutes between xx:15 and xx:18.
- the garden page has "Garden songs" which is a great idea - need a variable to do a search on certain words like garden/motorcycle etc. in song titles
- suck the old blog entries out of their database and build a page for each one putting them all in Category:Blog - maybe pull comments out too if possible - will be good because it gives practice having automated new page building
- create 'fixed' system variable that can have artist/album/search term embedded in it - ie. $wwr_music_search(bodhran) - so that people can put that on pages they create like the bodhran page or their personal page
- add xx Other songs about monsters xx System Search Music Database|monster|songtitle|title|RAND|3|R to the SONGS main template and help people code it and ignore the default template in code
- for chat rooms to switch templates, how about just if Main_room is in the page name, then assume main room? Would allow multiple templates as page Main_room_1 Main_room_2 etc. and people could change with a click of a button! :-) ... works good ... opens the door to all sorts of horrible looking chat pages to be created...but also opens the door to system controlling what is showed during peak load times
- think about/code the ability for people to quickly use different chat templates ala "What's Playing" - Sparkit's chat template is every bit as useful as J-Walk's and I want to give users the ability to easily switch between them
- need to get donation info about current month's expenses very prominent to insure operating costs are covered (For those that might be following this page, one of the reasons I'm slow to migrate certain old pages is because they are pretty well-written. It's easy to rewrite a page which sucks, but a page which is pretty good (emoticons, donations, etc.) is boring to rewrite in the wiki format. I like writing new code ... I get bored just porting old code.)
- Sayit: indicate it was a SAY IT in chat
- Jasper-songdata update showed all blank keywords etc. - run again, fix and give general eyeball to functioning with new comm scheme
- Jasper-write routine for quick (compressed) automated table dumps between machines
- Jasper-pull update music program out of V3 shell and put into V4(?) or whatever
- Jasper-pull spam killer out of V3 shell and put into V4(?) or whatever
- speed up stupid troopers report - suck data or at least remember which of their files has Talkeetna in it
- add variable for IPs used in the last 24 hours (and maybe intelligence for dial-up since is usually obvious)
- allow keyword search now that it's working
- keyword add for entire artist/album
- REQUESTED BY broke with new comm routine - see where it comes from and fix it
- repeat: It's time to write global code for wwr_form_field(name,, type(checkbox, text, etc),, what to display) that can be used anywhere to get data into databases. Allows 1) changing artist URL, CDBaby link, etc. 2) user parms like their URL, birthday, etc. - going to be difficult since it's both data verify and silent submit, but if you start small with just a few critical ones, it will really help reduce your workload and opens the door to users being able to do quite a bit to help maintain the databases. Don't forget to create a text log of database changes so you can monitor what people do and potentialy roll it back.
- fix "Last Played" to not be the current play date/time - gonna be a cute trick because will require a new db field or else a whole new table to store it
- not really needed - Can't believe they didn't build pageability into this thing. Same as me - it's an afterthought usually. Think about how you are going to be able to allow users to search, come up with 600 results and not slap 'em all into one big page. Could spool to file and then have URLs that point forward and back. Or, could just pass start and # of lines on URL for the query. That's probably best and would be least drag on CPU.
- figure out wiki maintenance tasks like purge databases etc.
- fix system variable "Date last played" if possible - may have to add new field to db and have jasper send it over before he wipes it out
- direct links to .jpg photos offsite in chat show huge photos - will probably need to get in and mung with any
- put in the form email you coded for V3 and include as "Contact"
- when IP is locked out, flag chat comments as invisible (or use another method)
- goof around with locking out ips just to see what it does - you're gonna need it sooner or later. consider hooking into wiki cookies and using the same strategy that was successful last time - also consider taking wiki locked out db dump and iptable'ing them completely or letting audio magazine routine do it
- music genre pages list artists / songs that match - requests enabled
- got to have a very quick routine to return true/false for "is song requestable?" instead of the dog you have now. Then use it to allow database searches to specify showing only songs that are requestable. (DONE) And, on database searches, set a default length of song allowed (like 7 mins max) to get rid of all the rants showing up as requestable.
- got to allow 'show' requests ... perhaps ... re-think the whole concept of 1 hour fixed segments of music genres and make sure it's still a viable concept ... what about 'blocks' of music? As long as the music either hangs together thematically, musically, or quality-wise perhaps 'musical blocks' is a format that will appeal?
- need to have "time of current queue" on music block request page
- fix *wwr_request_requested_by wwr_request_dedication requested by so can put in "Next 10 upcoming songs" - it's not respecting the uniqueid being passed but is just using the id of currently playing song
- get EJs to use new ranking file(done) - will have to convert old schedule records to use new math for rankings - NOTE: schedules no longer exist
- fix Jasper to recognize new keyword format NOTE: Jasper no longer cares about keywords since he doesn't build shows
- related, get to building/requesting shows: allow #minutes for the show(?) - allow query on artist DB and not just songdata DB - Note: NA
- add variable $wwr_username(optional_fixed_username) so can use in Special:Contributions and put on user pages or elsewhere. Begin finalizing this (optional_crap) syntax for all wwr_variables (i.e. write a global function to parse out all wwr variables, perhaps put them in an array, then process only the ones that were found instead of how you do it now, testing for all system variables on a page)
- it might finally be time to let music requests be a benny for writin pages, contributions etc. At least it'll be much easier now to let requests be less anal-retetive but at the same time keep the annoying/abusive/hyped-up over-requesting of the same artist/song to a minimum Note: Everything changes now that listeners are requesting blocks of music
Stuff that won't get ported from old site to new site
- Wheatgrams. Make no sense now with user talk pages.
My tech reference and stuff I don't want to forget
5
December http://en.wikipedia.org/wiki/Help:Advanced_templates
$wgRequest == might have the raw GET / POST data ... don't know and it really isn't any good at this point I don't think
Don't forget about
Wiki customizations to remember
- custom java goes in skins/common/wikibits.js
Request for javascript help on keeping a click counter
Easiest to just put this in bullet form:
- Phil Ringnalda wrote the original javascript code that allows us to keep track of clicks to external sites. I do not understand the details of the code.
- The general flow is that the HTML has onclick="loadXMLDoc(this.href)" for external links (look at source of the chat page or any artist's page). When the user clicks, the loadXMLDoc code is called. It ends up calling my wwclicktest.php program where I get site= and record the site being clicked on. You can run wwclicktest.php to see what has been passed to it.
- Using Firefox and IE, if you click directly on an external link, the code works. But if you "Open Link In New Window" (or "Open Link In New Tab" for Firefox) then the javascript code doesn't work. I do not know if it's never being called (i.e. onclick=javascript_code isn't working) or if the javascript code itself is simply not calling my click-counter-recorder application. I'd guess onclick is working but the javascript code can't handle Firefox "Open in New xxxxx".
The javascript code (available here) is:
function loadXMLDoc(url) {
var req;
var counterurl = 'http://www.wholewheatradio.org/wwclicktest.php?site=';
url = counterurl + url;
// branch for native XMLHttpRequest object
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
req.open("GET", url, false);
req.send(null);
// branch for IE/Windows ActiveX version
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
if (req) {
// bust the IE cache by adding a timestamp
var now = new Date();
url = url + '&time=' + now.getTime();
req.open("GET", url, false);
req.send();
}
}
}
- If someone is technically capable of debugging this, have at it. wwclicktest.php doesn't actually record any hits, but it shows you it is being called and what site it would have recorded a hit for so it's good for debugging. Keep in mind that the code works fine when left-mouse-click direct clicking on a link. It fails only when opening in a "New" window. If it's not "onclick" failing, then it's something in the javascript code that ain't working with "New" opens.
- If someone has better javascript code for calling a local program before opening a URL, I'd love to see it. Remember that the code will have to execute my wwclicktest.php code before (or concurrent with) actually going to the new site. I know that I could write a PHP program that all clicks point to and then do a HEADER(to_site_being_clicked) but I prefer not to do that. (I forget why and am too busy to go look up the original documentation, but I originally did it that way and had to back out and use javascript instead. All I remember is that it was a huge roadblock because I would never use javascript if I could possibly do it with PHP.) Thanks for any help on this! Jimbob 17:29, April 24, 2006 (AKDT)
- Jimbob -
- After several hours messing with Javascript mouse events, I think I have something you can try. There is no way I know of to trap the "Open" or "Open in New Window" actions on a right click. You can trap the right click, however, and then assume the user actually follows through with one of the Open actions. You need to add an "onmousedown" event to catch the right-clicks because "onclick" only processes left-clicks. The following code shows the event added to your Artist link and the handler used to process it. This seemed to work with a XMLHttpRequest-to-PHP loop I set up. I did only get to test this on IE however.
function clickhndl(e,url) {
if (!e) var e = window.event;
if (navigator.appName == 'Netscape'
&& e.which == 3) {
loadXMLDoc(url);
} else {
if (navigator.appName == 'Microsoft Internet Explorer'
&& e.button==2) {
loadXMLDoc(url);
}
}
}
Artist's Site: <a href="http://www.nataliemerchant.com" title='http://www.nataliemerchant.com/' class='external text'
onmousedown='clickhndl(event,this.href); return true;'
onclick="loadXMLDoc(this.href)">www.nataliemerchant.com</a>
- NOTE: There should be a closing "/a" tag at the end of the above code snippet, but wiki keeps stripping it out on me...
- Plexed 19:15, April 25, 2006 (AKDT)
- Note to self: http://jibbering.com/2002/4/httprequest.html
