eevan79 Posted May 26, 2010 Share Posted May 26, 2010 Hi, I have phpbb3 forum with 5 (or more) star rating mod (image), and I want to "convert" it to dropdown rating system (if possible). This is evaluation script: <script type="text/javascript"> var clicked = false; function eval_mouse_over(value, over) { for(var i = 1; i <= {EVALUATION_STARS}; i++) { var img = document.getElementsByName("evaluate" + i); for(var j = 0; j < img.length; j++) { if(((over) && (i <= value)) || ((!over) && (i <= {EVALUATION_RESULT_FLOOR}))) { img[j].src = "{EVALUATION_IMG_LIGHT}"; } else if((!over) && (i <= {EVALUATION_RESULT_CEIL}) && ({EVALUATION_RESULT_FLOOR} + 0.4 <= {EVALUATION_RESULT})) { img[j].src = "{EVALUATION_IMG_HALF}"; } else { img[j].src = "{EVALUATION_IMG_DARK}"; } } } } function eval_mouse_click(value) { if(!clicked) { clicked = true; window.location.href = "{EVALUATION_LINK}&evaluation=" + value; } } </script> EVALUATION_STARS, EVALUATION_IMG_DARK, EVALUATION_LINK are template vars. Can this be done? Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/203010-convert-short-rate-script-into-dropdown/ Share on other sites More sharing options...
spambadger Posted May 28, 2010 Share Posted May 28, 2010 I have no doubt it can be done, but there's more code involved than that - that's just functions for event hooks. You'd also need to provide the html that has the evaluate image, and the javascript that attaches those functions to the events (if that's done in js rather than html). Link to comment https://forums.phpfreaks.com/topic/203010-convert-short-rate-script-into-dropdown/#findComment-1064460 Share on other sites More sharing options...
eevan79 Posted May 28, 2010 Author Share Posted May 28, 2010 You are right...but thats lots of work. I do not believe that someone help me cause of that, but I can attach all mod files. I think that only 2 files need to be edited: \root\styles\subsilver2\templates\evaluation.html and root\mods\viewtopic.php It appears to be more complicated than I thought. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/203010-convert-short-rate-script-into-dropdown/#findComment-1064792 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.