[ Video Sharing CMS v4 ] File size

Started by ASDF,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ASDFTopic starter

Sorry Bro....but requesting you to please give me clear instructions on.
1. How to limit the size of a image to...1mb,21321kb or anything.
2. Is it possible, o make a image appear like video...I mean, of it'd height and width.
Please help me bro, and requesting you to not send me any link... :( :-\ :-\.
  •  

Marius P.

Hi,
I didn't really build that part myself, so don't know for now, I'm checking into the code.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.

Guess you could change com/com_image.php to something like

if(filesize($_FILES['play-img']['tmp_name']) > 200) { 
if (move_uploaded_file($_FILES['play-img']['tmp_name'], $savePath.$saveName.'.'.$ext)) {



and add an extra close like


}
//$db->clean_cache();



}
}
//$db->clean_cache();



Change that 200 to your size in bytes.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.

2. tpl/main/video.php


change:



<?php if ($video->media ==  3) { ?>
<div class="video-holder row-fluid">
<?php } else  { ?>



to:


<?php if ($video) { ?>

//dummy if to not make you look for the } :)


AND also remove:

<?php if ($video->media ==  3) { ?>
<?php echo $embedvideo; ?>
<?php } ?>



//This will re-print the images in the video container as before editions did.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

ASDFTopic starter

Hey Mario...there is nothing in com_image.php as you have mentioned in above codes.....i mean the 200 thing...
  •  

ASDFTopic starter

i think you should look into :P
class.image.php
class/com.uploads.php
  •  

ASDFTopic starter

Also for the second opion...the instructions/codes that you gave me...made the photo disappeared totally.
  •  

Marius P.

That line is what you need to add...right before

if (move_uploaded_file($_FILES['play-img']['tmp_name'], $savePath.$saveName.'.'.$ext)) {
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.

I've tested the second change with no problem...read again make sure you did exactly what I've instructed you.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

ASDFTopic starter

Sorry bro... :p, the second thing works.
  •  

ASDFTopic starter

 :) :) :)....both of them works, thank you Mario.
  •  

Similar topics (7)