Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Plug-in/Snippet] Random movies (Movie of the week) [RevCms]

Junior Spellweaver
Joined
Nov 11, 2012
Messages
174
Reaction score
84
Hey again ragezone x) I think you have seen a lot of me theese past few days / weeks but i wasn't sure about releasing this plugin att first beacuse i wanted my retro to be unique but i was thinking either i release it or someone is gonna steal it and rip it off taking all the cred so i am releasing it for all of you guys. In this plugin you will get acess to:

Housekeeping page/Script for this

A php code that displays the movie(s) at random with order by rand() so they become random

And finally you will get the sqls for it

Note: The Sqls are for all databases but the plugin is ajusted to revcms.

Screen:
Leon Retros - [Plug-in/Snippet] Random movies (Movie of the week) [RevCms] - RaGEZONE Forums


Sqls:
PHP:
CREATE TABLE IF NOT EXISTS `movie` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `link` varchar(1000) NOT NULL,
  PRIMARY KEY (`id`)
)

Php code (put the code where you want it to display):
PHP:
<?php
							$query = mysql_query("SELECT * from movie ORDER BY RAND() DESC LIMIT 1");
							while($movie = mysql_fetch_array($query)) {
								$id = $movie['id'];
								$link = $movie['link'];
							
								
								
								
						?>
							
							
			
		<iframe src="<?php echo $movie['link']; ?>" width="550px" height="200px;" frameborder="0"></iframe>
						<?php } ?>

And finally the plugin for the housekeeping(create a new page and add this into it , adjust it to your housekeeping) :
PHP:
        <?php						
			if (isset($_POST['movie_submit'])) {
				if (!empty($_POST['movie_code'])) {
					if (strlen($_POST['movie_code']) > 3) {
						if (mysql_num_rows(mysql_query("SELECT * FROM `movie` WHERE `link` = '".filter($_POST['movie_code'])."'")) == 0) {
							mysql_query("INSERT INTO `movie` (`link`) VALUES ('".filter($_POST['movie_code'])."')") or die(mysql_error());
					
							echo '<div class="alert alert-success">You have added this movie without any problems!</div>';
						}
						else
							echo '<div class="alert alert-danger">This movie already exits!</div>';
					} else {
						echo '<div class="alert alert-danger">The link must be more than 3 letters / numbers!</div>';
					}
				} else {
					echo '<div class="alert alert-danger">Please add a movie!</div>';
				}
			}					
			?>
			<center>
			The link of the movie :
			<br />
					<form method="POST" action="#" class="form-horizontal" role="form">
						<div class="form-group">
								<textarea name="movie_code" class="form-control" placeholder="Länk">
							</textarea></div>
							<br />
						<div class="form-group">
								<input type="submit" name="movie_submit" value="Add Movie" class="btn btn-default">
						</div>
					</form></center>
					<?php			
					$getMovie = mysql_query("SELECT * FROM `movie` ORDER BY `id` DESC");
					if (mysql_num_rows($getMovie) > 0) { ?>
						<table class="table table-striped">
						<thead>
						<tr>
							<th nowrap="nowrap">Id</th>
							<th nowrap="nowrap">Movie Link</th>
							
						</tr>
						</thead>
						<tbody>
						<?php
						while ($movieData = mysql_fetch_array($getMovie)) {
							echo '
							<tr>
								<td>'.$movieData['id'].'</td>
								<td>'.$movieData['link'].'</td>									
								
							</tr>';
						}
						?>
						</tbody>
						</table>
					<?php } else {
						echo '<br/><br/><div class="alert alert-warning">They\'re currently isn\'t any movies.</div>';
					}
					?>

And since some people maybe don't understand how this works its easy , you need to have a movie url
ex the movie link to divergent( )
You can easily find the links by inspecting elements through google chrome . Movies can be found at streaming websites as swefilmer.com and movie4k.to

Hope you enjoy it & thanks for me
 
G'nome sayin'
Joined
May 19, 2011
Messages
459
Reaction score
226
I don't see the point with using sql for this, use HTML and update it weekly. Anyone could have made this.

And why steer users away with movies, don't you want them to play on your retro? just post the trailer from YouTube.
 
Junior Spellweaver
Joined
Nov 11, 2012
Messages
174
Reaction score
84
Guys i an sorry if you didn't like the release but i tried My best with something new , the plugin is for thoose WHO wants too look st a Movie the same time as Platini retros , and honestly i sid My best and if you dont like please dont say it. in à Lena say just say it. simpel
 
Junior Spellweaver
Joined
Nov 28, 2013
Messages
164
Reaction score
18
Although, none of you are looking outside the box, this is Habbo related, and can be used for your retros. It can be used for competitions or events, to help boost population of your hotel. It can be updated weekly to maybe introduce a new feature, or furni range into the hotel, or maybe users of your retro community come together to build a hotel video to entise new users to play and show new users what's available on your hotels.

Some people, i for one enjoy listening to music while playing retros, so this is a great feature.
 
Joined
May 8, 2010
Messages
1,902
Reaction score
669
Its unique, i can tell you that.
Dont autoplay or autobuffer because it will slow your website down.
And dont stream rips of movies, because well, you can get in more trouble than just using Sulakes IP.
Having a section that allows you to showcase a weekly video or something could be good, such as an ad for your hotel or a user made video.
 
Initiate Mage
Joined
Mar 26, 2014
Messages
50
Reaction score
5
It's great to see that people take time, and share their work with the community. Thank you! :)
 
Joined
Feb 22, 2012
Messages
2,099
Reaction score
1,271
Now instead of we having a C&D by running a Retro, we will also get procecuted for piracy... By Hollywood.
Anyways, it seems nice for some editing and using for Youtube thang, and showing some trailers, or best room of the week, or idk...
Each week the mods do a new video, and shitz like that, which would be a better idea than movies...

Thanks, I guess...
 
Experienced Elementalist
Joined
Aug 7, 2011
Messages
257
Reaction score
37
That PHP is sooooo ugly even my grandma looks better in the morning.
 
Back
Top