-
Posts
2,667 -
Joined
-
Last visited
-
Days Won
75
Content Type
Profiles
Forums
Events
Everything posted by Uridium
-
[mccodes V2] Add any type of video media to your game
Uridium replied to Uridium's topic in Free Modifications
Re: [mccodes V2] Add any type of video media to your game one new SQL to add... ALTER TABLE videos ADD source VARCHAR (255) NOT NULL; Overwrite your staff_videos.php with this one <?php include "sglobals.php"; if($ir['user_level'] > 2) { die("403"); } //This contains video stuffs switch($_GET['action']) { case "addvideo": addvideo(); break; case "editvideo": editvideo(); break; case "delvideo": delvideo(); break; default: print "Error: This sipt requires an action."; break; } function addvideo() { global $db, $ir, $c, $h, $userid; $videoidlink=abs((int) $_POST['videoidlink']); $width=abs((int) $_POST['width']); $height=abs((int) $_POST['height']); if($_POST['name'] && $_POST['title'] && $videoidlink && $height && $width) { $db->query("INSERT INTO videos VALUES(NULL, '{$_POST['name']}', '{$_POST['title']}', '{$_POST['alphabet']}', '{$_POST['playerswflink']}', '{$_POST['videophplink']}', '{$_POST['allowaccess']}', '{$_POST['autostart']}', '$videoidlink', '$width', '$height', '{$_POST['source']}')"); print "video Artist {$_POST['name']} Track Title {$_POST['title']} added. <h1>Preview</h1> <center><embed src='{$_POST['playerswflink']}' width='$width' height='$height' allowsiptallowaccess='{$_POST['videophplink']}' allowfullseen='true' flashvars='height=$height&width=$width&file={$_POST['videophplink']}&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xCC0000&displayheight=$height&autostart={$_POST['autostart']}'/></a></embed></center> "; stafflog_add("Added video {$_POST['title']}"); } else { print "<h3>Add video</h3><hr /> <form action='staff_videos.php?action=addvideo' method='post'> Artist Name: <input type='text' name='name' /> Track Title: <input type='text' name='title' /> Alphabet Letter: <input type='text' name='alphabet' /> SWF Link: <input type='text' name='playerswflink' /> Example [url]http://www.domain.com/music/vplayer.swf[/url] PHP link: <input type='text' name='videophplink' /> Example [url]http://www.domain.com/music/flash.php?id=[/url] Allow allowaccess: <input type='text' name='allowaccess' /> Default always Autostart Media: <input type='text' name='autostart' /> true or false Video ID Number: <input type='text' name='videoidlink' /> example 17635 Player Width: <input type='text' name='width' /> default 350 Player Height: <input type='text' name='height' />default 400 Video Source: <input type='text' name='source' />Example youtube.com <input type='submit' value='Add video' /></form>"; } } function editvideo() { global $db, $ir, $c, $h, $userid; switch($_POST['step']) { case "2": $videoidlink=abs((int) $_POST['videoidlink']); $width=abs((int) $_POST['width']); $height=abs((int) $_POST['height']); $name=$_POST['name']; $db->query("UPDATE videos SET artist='$name', tracktitle='{$_POST['title']}', videoalphabet='{$_POST['alphabet']}', playerswflink='{$_POST['playerswflink']}', videophplink='{$_POST['videophplink']}' , videoidlink=$videoidlink, width=$width, height=$height, source='{$_POST['source']}' WHERE videoID={$_POST['video']}"); print "video $name was edited successfully. <h1>Preview</h1> <center><embed src='{$_POST['playerswflink']}' width='$width' height='$height' allowsiptallowaccess='{$_POST['allowaccess']}' allowfullseen='true' flashvars='height=$height&width=$width&file={$_POST['videophplink']}&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xCC0000&displayheight=$height&autostart={$_POST['autostart']}'/></a></embed></center> "; stafflog_add("Edited video $name"); break; case "1": $q=$db->query("SELECT * FROM videos WHERE videoID={$_POST['video']}"); $old=$db->fetch_row($q); print "<h3>Editing a video</h3><hr /> <form action='staff_videos.php?action=editvideo' method='post'> <input type='hidden' name='step' value='2' /> <input type='hidden' name='video' value='{$_POST['video']}' /> Artist Name <input type='text' name='name' value='{$old['artist']}' /> Track Title: <input type='text' name='title' value='{$old['tracktitle']}' /> Alphabet Entry: <input type='text' name='alphabet' value='{$old['videoalphabet']}' /> SWF link Text: <input type='text' name='playerswflink' value='{$old['playerswflink']}' /> PHP Link Text: <input type='text' name='videophplink' value='{$old['videophplink']}' /> Allow allowaccess: <input type='text' name='allowaccess' value='{$old['allowaccess']}' /> Auto Start: <input type='text' name='autostart' value='{$old['autostart']}' />true or false Video ID Number: <input type='text' name='videoidlink' value='{$old['videoidlink']}' /> Player Width: <input type='text' name='width' value='{$old['width']}' /> Player Height: <input type='text' name='height' value='{$old['height']}' /> Video Source: <input type='text' name='source' value='{$old['source']}' /> <input type='submit' value='Edit video' /></form>"; break; default: print "<h3>Editing a video</h3><hr /> <form action='staff_videos.php?action=editvideo' method='post'> <input type='hidden' name='step' value='1' /> video: ".video2_dropdown($c, "video")." <input type='submit' value='Edit video' /></form>"; break; } } function delvideo() { global $db,$ir,$c,$h,$userid; if($_POST['video']) { $q=$db->query("SELECT * FROM videos WHERE videoID={$_POST['video']}"); $old=$db->fetch_row($q); $db->query("DELETE FROM videos WHERE videoID={$_POST['video']}"); print "video {$old['tracktitle']} deleted."; stafflog_add("Deleted video {$old['tracktitle']}"); } else { print "<h3>Deleting a video</h3><hr /> <form action='staff_videos.php?action=delvideo' method='post'> video: ".video2_dropdown($c, "video")." <input type='submit' value='Delete video' /></form>"; } } $h->endpage(); ?> Now over write your playvideo.php with this one <?php include "globals.php"; global $db,$r,$c,$userid; $_GET['st'] = abs((int) $_GET['st']); $st=($_GET['st']) ? $_GET['st'] : 0; $by=($_GET['by']) ? $_GET['by'] : 'tracktitle'; $ord=($_GET['ord']) ? $_GET['ord'] : 'ASC'; $_GET['u'] = abs((int) $_GET['u']); if(!$_GET['u']) { print "Invalid use of file"; } else { $video=$db->query("SELECT * FROM videos WHERE videoID={$_GET['u']}",$c); if($db->fetch_row($video) == 0) { print "There is no such video!"; } else { $r=$db->query("SELECT artist, tracktitle, playerswflink, videophplink, width, height, allowaccess FROM videos WHERE videoID={$_GET['u']}",$c); $r = $db->fetch_row($r); print " <h1>Artist <font color='yellow'>{$r['artist']}</font> Track <font color='yellow'> {$r['tracktitle']}</font></h1> <h1>Session Playing</h1> [img=curtains.png] <DIV STYLE='position:absolute; top:500px; left:360px; width:200px; height:50px'> <CENTER><FONT SIZE='+2' COLOR='00ff00'><embed src='{$r['playerswflink']}' width='{$r['width']}' height='{$r['height']}' allowsiptallowaccess='{$r['allowaccess']}' allowfullseen='true' flashvars='height={$r['height']}&width={$r['width']}&file={$r['videophplink']}&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xCC0000&displayheight={$r['height']}&autostart='{$r['autostart']}' /></a></embed></center> </FONT></CENTER> </DIV> "; } } $h->endpage(); ?> And upload this image -
[mccodes V2] Add any type of video media to your game
Uridium replied to Uridium's topic in Free Modifications
Re: [mccodes V2] Add any type of video media to your game I'll repost my copy as ive made some amendements -
[mccodes V2] Add any type of video media to your game
Uridium replied to Uridium's topic in Free Modifications
Re: [mccodes V2] Add any type of video media to your game Quick Update..... When i Re-post the upgraded Mod... Users can Add, Edit their own Videos (Staff will still have power to remove any videos) And just so users dont go mental and start adding Millions od Videos they are set to only ADD 3 videos per week. Users can also save Videos to their Video Vault for easy access...... Also changed a few things on the Original script. -
[mccodes V2] Add any type of video media to your game
Uridium replied to Uridium's topic in Free Modifications
Re: [mccodes V2] Add any type of video media to your game To get videos to work breif guide When you goto youtube and open up a video link on the right there is an embed code.... <object width="560" height="340"><param name="movie" value=" "></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src=" " type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object> you need to place this piece only into the SWF LINK and the PHP LINK -
[mccodes V2] Add any type of video media to your game
Uridium replied to Uridium's topic in Free Modifications
Re: [mccodes V2] Add any type of video media to your game did you also ammend the SQL error i made... I did post the fix. -
[mccodes V2] Add any type of video media to your game
Uridium replied to Uridium's topic in Free Modifications
Re: [mccodes V2] Add any type of video media to your game You dont just have to use Video formats to work on this you can also Use mp3 wav midi even link to your own radio site if you have one it will play anything...... For MP3 media to work put the full URL for the track you want to play in both the SWF and the PHP link and set the ID number to 1...... Same applies for the Radio..... -
[mccodes V2] Add any type of video media to your game
Uridium replied to Uridium's topic in Free Modifications
Re: [mccodes V2] Add any type of video media to your game Liven it up a notch.. -
[mccodes V2] Add any type of video media to your game
Uridium replied to Uridium's topic in Free Modifications
Re: [mccodes V2] Add any type of video media to your game Media tested on phpmotion google youtube musicjesus myspace dailymotion All work perfectly -
[mccodes V2] Add any type of video media to your game
Uridium replied to Uridium's topic in Free Modifications
Re: [mccodes V2] Add any type of video media to your game Finally completed the user section..... call this files videos.php <?php include "globals.php"; $_GET['st'] = abs((int) $_GET['st']); $st=($_GET['st']) ? $_GET['st'] : 0; $by=($_GET['by']) ? $_GET['by'] : 'tracktitle'; $ord=($_GET['ord']) ? $_GET['ord'] : 'ASC'; print "<h3>Userlist</h3>"; $cnt=$db->query("SELECT * FROM videos",$c); $membs=mysql_num_rows($cnt); $pages=(int) ($membs/100)+1; if($membs % 100 == 0) { $pages--; } print "Pages: "; for($i=1;$i <= $pages;$i++) { $stl=($i-1)*10; print "[url='videos.php?st=$stl&by=$by&ord=$ord']$i[/url] "; } print " Order By: [url='videos.php?st=$st&by=videoalphabet&ord=$ord']Alphabet Letter[/url] | [url='videos.php?st=$st&by=artist&ord=$ord']artist[/url] | [url='videos.php?st=$st&by=tracktitle&ord=$ord']Track Title[/url] [url='videos.php?st=$st&by=$by&ord=asc']Ascending[/url] | [url='videos.php?st=$st&by=$by&ord=desc']Descending[/url] "; $q=$db->query("SELECT * FROM videos ORDER BY $by $ord LIMIT $st,100"); $no1=$st+1; $no2=$st+10; print "Showing Videos $no1 to $no2 by order of $by $ord. <table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Track Name</th><th>Artists Name</th><th>Letter</th><th>Preview</th></tr>"; while($r=$db->fetch_row($q)) { $d=""; if($r['tracktitle']) { $r['artist'] = "<font color=yellow>{$r['artist']}</font>";$d=""; } print "<tr><td>{$r['tracktitle']}</td><td>[url='playvideo.php?u={$r[']{$r['artist']}[/url]</td><td>{$r['videoalphabet']}</td><td><center><embed src='{$r['playerswflink']}' width='100' height='100' allowsiptallowaccess='{$r['videophplink']}' allowfullseen='true' flashvars='height=100&width=100&file={$r['videophplink']}&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xCC0000&displayheight=100&autostart='false'/></a></embed></center> </td>"; print "</td></tr>"; } print "</table>"; $h->endpage(); ?> And call this file playvideo.php <?php include "globals.php"; global $db,$r,$c,$userid; $_GET['st'] = abs((int) $_GET['st']); $st=($_GET['st']) ? $_GET['st'] : 0; $by=($_GET['by']) ? $_GET['by'] : 'tracktitle'; $ord=($_GET['ord']) ? $_GET['ord'] : 'ASC'; $_GET['u'] = abs((int) $_GET['u']); if(!$_GET['u']) { print "Invalid use of file"; } else { $video=$db->query("SELECT * FROM videos WHERE videoID={$_GET['u']}",$c); if($db->fetch_row($video) == 0) { print "There is no such video!"; } else { $r=$db->query("SELECT artist, tracktitle, playerswflink, videophplink, width, height, allowaccess FROM videos WHERE videoID={$_GET['u']}",$c); $r = $db->fetch_row($r); print " <h1>Artist <font color='yellow'>{$r['artist']}</font> Track <font color='yellow'> {$r['tracktitle']}</font></h1> <h1>Session Playing</h1> <center><embed src='{$r['playerswflink']}' width='{$r['width']}' height='{$r['height']}' allowsiptallowaccess='{$r['allowaccess']}' allowfullseen='true' flashvars='height={$r['height']}&width={$r['width']}&file={$r['videophplink']}&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xCC0000&displayheight={$r['height']}&autostart='false'/></a></embed></center> "; //$db->query("UPDATE videos SET videoVIEWS=videoVIEWS+1 WHERE videoID={$_GET['u']}"); } } $h->endpage(); ?> Few Screenies From SELECT menu From Play Screen... TEST SITE http://www.mccode.doom-nights.com Look on left menu near bottom for Video Link. -
Re: adding php to an embed code ? At long last ive fixed the stupid god foresaken damn annoying thing ;) test site www.mccode.doom-nights.com/videos.php
-
Re: adding php to an embed code ? tried that Nothing at all is being called not even the part that dislpays the title name and artist name
-
Re: adding php to an embed code ? ok i a nut shell ive mad the admin center so staff can insert the link for swf + the php page + height width allowaccess,, What i need is for when a user selects the required link from the video page the video opens up with the links added to the SQL Except that the links are blank. here is my full script for the users... videos.php <?php include "globals.php"; $_GET['st'] = abs((int) $_GET['st']); $st=($_GET['st']) ? $_GET['st'] : 0; $by=($_GET['by']) ? $_GET['by'] : 'tracktitle'; $ord=($_GET['ord']) ? $_GET['ord'] : 'ASC'; print "<h3>Userlist</h3>"; $cnt=$db->query("SELECT tracktitle FROM videos",$c); $membs=mysql_num_rows($cnt); $pages=(int) ($membs/100)+1; if($membs % 100 == 0) { $pages--; } print "Pages: "; for($i=1;$i <= $pages;$i++) { $stl=($i-1)*100; print "[url='videos.php?st=$stl&by=$by&ord=$ord']$i[/url] "; } print " Order By: [url='videos.php?st=$st&by=videoalphabet&ord=$ord']Alphabet Letter[/url] | [url='videos.php?st=$st&by=artist&ord=$ord']artist[/url] | [url='videos.php?st=$st&by=tracktitle&ord=$ord']Track Title[/url] [url='videos.php?st=$st&by=$by&ord=asc']Ascending[/url] | [url='videos.php?st=$st&by=$by&ord=desc']Descending[/url] "; $q=$db->query("SELECT * FROM videos ORDER BY $by $ord LIMIT $st,100"); $no1=$st+1; $no2=$st+100; print "Showing Videos $no1 to $no2 by order of $by $ord. <table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Track Name</th><th>Artists Name</th><th>Letter</th></tr>"; while($r=$db->fetch_row($q)) { $d=""; if($r['tracktitle']) { $r['artist'] = "<font color=yellow>{$r['artist']}</font>";$d=""; } print "<tr><td>{$r['tracktitle']}</td><td>[url='playvideo.php?u={$r[']{$r['artist']}[/url]</td><td>{$r['videoalphabet']}</td>"; print "</td></tr>"; } print "</table>"; $h->endpage(); ?> playvideo.php <?php include "globals.php"; global $db,$r,$c,$userid; $_GET['u'] = abs((int) $_GET['u']); if(!$_GET['u']) { print "Invalid use of file"; } else { $video=$db->query("SELECT * FROM videos WHERE videoID={$_GET['u']}",$c); if($db->fetch_row($video) == 0) { print "There is no such video!"; } else { $r=$db->query("SELECT playerswflink, videophplink, width, height, allowaccess FROM videos ",$c); $db->fetch_row($r); print "video Artist {$r['name']} Track Title {$r['title']} added. <h1>Preview</h1> <center><embed src='{$r['playerswflink']}' width='$width' height='$height' allowsiptallowaccess='{$r['videophplink']}' allowfullseen='true' flashvars='height=$height&width=$width&file={$r['videophplink']}$videoidlink&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xCC0000&displayheight=$height&autostart='{$r['autostart']}'/></a></embed></center> "; //$db->query("UPDATE videos SET videoVIEWS=videoVIEWS+1 WHERE videoID={$_GET['u']}"); } } $h->endpage(); ?>
-
Ok got a bit of a brain freeze and this thing is annoing me.... <?php include "globals.php"; global $db,$r,$c,$userid; $_GET['u'] = abs((int) $_GET['u']); if(!$_GET['u']) { print "Invalid use of file"; } else { $video=$db->query("SELECT * FROM videos WHERE videoID={$_GET['u']}",$c); if($db->fetch_row($video) == 0) { print "There is no such video!"; } else { $q=$db->query("SELECT playerswflink, videophplink, width, height, allowaccess FROM videos ",$c); $db->fetch_row($q); print "video Artist {$r['name']} Track Title {$r['title']} added. <h1>Preview</h1> <center><embed src='{$r['playerswflink']}' width='$width' height='$height' allowsiptallowaccess='{$r['videophplink']}' allowfullseen='true' flashvars='height=$height&width=$width&file={$r['videophplink']}$videoidlink&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xCC0000&displayheight=$height&autostart='{$r['autostart']}'/></a></embed></center> "; } } $h->endpage(); ?> The $'s are not being placed into the script neither is the {$r['playerswflink']} can anyone tell me what im doing wrong here its annoying me as you can see here from the Source code from the webpage you will see that '' isnt being inserted <embed src='' width='' height='' allowsiptallowaccess='' allowfullseen='true' flashvars='height=&width=&file=&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xCC0000&displayheight=&autostart='/></a></embed>
-
[mccodes V2] Add any type of video media to your game
Uridium replied to Uridium's topic in Free Modifications
Re: [mccodes V2] Add any type of video media to your game Sorry found a typo on the SQLS change `videoIDlink` INT(11) NOT NULL default '186', to `videoidlink` INT(11) NOT NULL default '0', -
[mccodes V2] Add any type of video media to your game
Uridium replied to Uridium's topic in Free Modifications
Re: [mccodes V2] Add any type of video media to your game Ok so how does it work... All sites use either a sef link and or a php link both of which also use a unique ID for the track to be played... so For example.... if you want to play say Wonderwoman. (Bound to get some crap comments now lol) The url on youtube is...... <object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/qahSU4RYblY&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/qahSU4RYblY&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object> We need to extract a few parts from here example the link for swf would be the PHP link would be And the Video ID link number would be 1 to work on Youtube... for Jesusjones.com the link looks like <center><embed src='http://www.gamepapa.com/music/vplayer.swf' width='480' height='360' allowscriptaccess='always' allowfullscreen='true' flashvars='height=360&width=480&file=http://www.gamepapa.com/music/flash.php?id=186&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xCC0000&displayheight=380&autostart=true'/></a></embed></center> So the example would be SWF LINK = http://www.gamepapa.com/music/vplayer.swf PHP LINK = http://www.gamepapa.com/music/flash.php?id= Video Track ID = 186 -
[mccodes V2] Add any type of video media to your game
Uridium replied to Uridium's topic in Free Modifications
Re: [mccodes V2] Add any type of video media to your game SQLS CREATE TABLE `videos` ( `videoID` INT(11) NOT NULL auto_increment, `artist` varchar(255) NOT NULL default 'ABBA', `tracktitle` varchar(255) NOT NULL default 'One Of US', `videoalphabet` varchar(255) NOT NULL default 'A', `playerswflink` varchar(255) NOT NULL default 'http://www.gamepapa.com/music/vplayer.swf', `videophplink` varchar(255) NOT NULL default 'http://www.gamepapa.com/music/flash.php?id=', `allowaccess` varchar(255) NOT NULL default 'always', `autostart` varchar(255) NOT NULL default 'true', `videoIDlink` INT(11) NOT NULL default '186', `width` INT(11) NOT NULL default '350', `height` INT(11) NOT NULL default '400', PRIMARY KEY (`videoID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Call this file staff_videos.php <?php include "sglobals.php"; if($ir['user_level'] > 2) { die("403"); } //This contains video stuffs switch($_GET['action']) { case "addvideo": addvideo(); break; case "editvideo": editvideo(); break; case "delvideo": delvideo(); break; default: print "Error: This sipt requires an action."; break; } function addvideo() { global $db, $ir, $c, $h, $userid; $videoidlink=abs((int) $_POST['videoidlink']); $width=abs((int) $_POST['width']); $height=abs((int) $_POST['height']); if($_POST['name'] && $_POST['title'] && $videoidlink && $height && $width) { $db->query("INSERT INTO videos VALUES(NULL, '{$_POST['name']}', '{$_POST['title']}', '{$_POST['alphabet']}', '{$_POST['playerswflink']}', '{$_POST['videophplink']}', '{$_POST['allowaccess']}', '{$_POST['autostart']}', '$videoidlink', '$width', '$height')"); print "video Artist {$_POST['name']} Track Title {$_POST['title']} added. <h1>Preview</h1> <center><embed src='{$_POST['playerswflink']}' width='$width' height='$height' allowsiptallowaccess='always' allowfullseen='true' flashvars='height=360&width=480&file={$_POST['videophplink']}$videoidlink&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xCC0000&displayheight=380&autostart=true'/></a></embed></center> "; stafflog_add("Added video {$_POST['title']}"); } else { print "<h3>Add video</h3><hr /> <form action='staff_videos.php?action=addvideo' method='post'> Artist Name: <input type='text' name='name' /> Track Title: <input type='text' name='title' /> Alphabet Letter: <input type='text' name='alphabet' /> SWF Link: <input type='text' name='playerswflink' /> Example [url]http://www.domain.com/music/vplayer.swf[/url] PHP link: <input type='text' name='videophplink' /> Example [url]http://www.domain.com/music/flash.php?id=[/url] Allow allowaccess: <input type='text' name='allowaccess' /> Default always Autostart Media: <input type='text' name='autostart' /> true or false Video ID Number: <input type='text' name='videoidlink' /> example 17635 Player Width: <input type='text' name='width' /> default 350 Player Height: <input type='text' name='height' />default 400 <input type='submit' value='Add video' /></form>"; } } function editvideo() { global $db, $ir, $c, $h, $userid; switch($_POST['step']) { case "2": $videoidlink=abs((int) $_POST['videoidlink']); $width=abs((int) $_POST['width']); $height=abs((int) $_POST['height']); $name=$_POST['name']; $db->query("UPDATE videos SET artist='$name', tracktitle='{$_POST['title']}', videoalphabet='{$_POST['alphabet']}', playerswflink='{$_POST['playerswflink']}', videophplink='{$_POST['videophplink']}' , videoidlink=$videoidlink, width=$width, height=$height WHERE videoID={$_POST['video']}"); print "video $name was edited successfully. <h1>Preview</h1> <center><embed src='{$_POST['playerswflink']}' width='$width' height='$height' allowsiptallowaccess='always' allowfullseen='true' flashvars='height=360&width=480&file={$_POST['videophplink']}$videoidlink&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0xCC0000&displayheight=380&autostart=true'/></a></embed></center> "; stafflog_add("Edited video $name"); break; case "1": $q=$db->query("SELECT * FROM videos WHERE videoID={$_POST['video']}"); $old=$db->fetch_row($q); print "<h3>Editing a video</h3><hr /> <form action='staff_videos.php?action=editvideo' method='post'> <input type='hidden' name='step' value='2' /> <input type='hidden' name='video' value='{$_POST['video']}' /> Artist Name <input type='text' name='name' value='{$old['artist']}' /> Track Title: <input type='text' name='title' value='{$old['tracktitle']}' /> Alphabet Entry: <input type='text' name='alphabet' value='{$old['videoalphabet']}' /> SWF link Text: <input type='text' name='playerswflink' value='{$old['playerswflink']}' /> PHP Link Text: <input type='text' name='videophplink' value='{$old['videophplink']}' /> Allow allowaccess: <input type='text' name='allowaccess' value='{$old['allowaccess']}' /> Auto Start: <input type='text' name='autostart' value='{$old['autostart']}' />true or false Video ID Number: <input type='text' name='videoidlink' value='{$old['videoidlink']}' /> Player Width: <input type='text' name='width' value='{$old['width']}' /> Player Height: <input type='text' name='height' value='{$old['height']}' /> <input type='submit' value='Edit video' /></form>"; break; default: print "<h3>Editing a video</h3><hr /> <form action='staff_videos.php?action=editvideo' method='post'> <input type='hidden' name='step' value='1' /> video: ".video2_dropdown($c, "video")." <input type='submit' value='Edit video' /></form>"; break; } } function delvideo() { global $db,$ir,$c,$h,$userid; if($_POST['video']) { $q=$db->query("SELECT * FROM videos WHERE videoID={$_POST['video']}"); $old=$db->fetch_row($q); $db->query("DELETE FROM videos WHERE videoID={$_POST['video']}"); print "video {$old['tracktitle']} deleted."; stafflog_add("Deleted video {$old['tracktitle']}"); } else { print "<h3>Deleting a video</h3><hr /> <form action='staff_videos.php?action=delvideo' method='post'> video: ".video2_dropdown($c, "video")." <input type='submit' value='Delete video' /></form>"; } } $h->endpage(); ?> Add these links to smenu Create New video Edit Exsisting video Delete video Open up global_func.php and add this function video2_dropdown($connection,$ddname="video",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM videos ORDER BY tracktitle ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['videoID']}'"; if ($selected == $r['videoID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['tracktitle']}</option>"; } $ret.="\n</select>"; return $ret; } -
Ive started a script which will allow staff to put up any type of video link from google, youtube and virtually any other kind of media that uses flash player. The prototype works fine for the admin section just a few editing Flash problems to overcome. Artist Name: Track Title: Alphabet Letter: SWF Link: Example http://www.domain.com/music/vplayer.swf PHP link: Example http://www.domain.com/music/flash.php?id= Allow Access: Default always Autostart Media: true or false Video ID Number: example 17635 Player Width: default 350 Player Height: default 400 Is how the staff menu is laid out havent started the user side yet but that wont take too long......
-
Automatically returns to inventory after equipping
Uridium replied to furn355's topic in Free Modifications
Re: Automatically returns to inventory after equipping Ive just given you a +1 cos your script as just helped me out on one of my mods Cheers and keep up the good work... -
Re: [MC-Codes][V2]Thugs (core system) What is it with this Girl and Arrays shes Array mad.
-
mccode-v2 100% Working Copy Enhanced Schooling
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] 100% Working Copy Enhanced Schooling Thanks to furn355's script from here FURNS SCRIPT We can fix the refreshing error.. open your education.php and imediatley underneath include"globals.php"; add print"<META HTTP-EQUIV=Refresh CONTENT='100;url=index.php'>"; That should cure it... -
[UPDATE] V2 extract Users from Bots when adding to Battletent
Uridium replied to Uridium's topic in Free Modifications
Re: [uPDATE] V2 extract Users from Bots when adding to Battletent Badgirl All my scripts are generated for easy setup and run for everyone even those that havent got a clue what stripslashes are.. When you purchase your first MCCODES script there is hardly any mention of of higher level php coding so i keep all mine as basic as possible to help those that are still learning. Once theyve gained more confidence then they can change the script to their needs. -
mccode-v2 100% Working Copy Enhanced Schooling
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] 100% Working Copy Enhanced Schooling Yeah i noticed that this morning i'll work on a fix for it... -
Are you fed up of the standard font files on your game ? so heres the problem you can change them to a font file in your c:\fonts folder but then you run into the problem that if another user doesnt have that particular font then all they will see is the default arial font instead. So have a read of this article and get your newly uploaded fonts noticed by everyone. READ THIS POST And start having fun with your new fonts.
-
[MCCODES V2] Fighting stats just cleaned up
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] Fighting stats just cleaned up <? $stat = mysql_fetch_object(mysql_query("SELECT `strength`, `agility`, `guard`, `labour` FROM `userstats` WHERE (`userid` = ". $ir['userid'] .")")); echo '<h2>Fighting Stats</h2>'. '<table border="1" width="100%">'. '<tr>'. '<th>Strength</th>'. '<th>Agility</th>'. '<th>Guard</th>'. '<th>Labour</th> '<th>Total Stats</th>'. '</tr>'. '<tr style="text-align: center;">'. '<td>'. $stat->strength .'</td>'. '<td>'. $stat->agility .'</td>'. '<td>'. $stat->guard .'</td>'. '<td>'. $stat->labour .'</td>'. '<td>'. ($stat->strength + $stat->agility + $stat->guard + $stat->labour) .'</td>'. '</tr>'. '</table>'; ?>