Related Topics


[Video CMS v4]Admin Uploads vs Members Uploads  (Read 1296 times) Print

1 B


megaman79  July 30, 2014, 10:58:10 PM

Hello PHPVibe,

How can I make all Admin YouTube Upload be Published by Default, but Members Uploaded Videos Go to Unpublished ?

Because I want to control who Upload Videos. (Spammers upload video)

I want all my videos to go Published Only.

Logged
"Very Happy with PHPVibe"


Alexander  July 31, 2014, 03:43:47 PM

if(is_admin()) { /* It's an admin */}

Example for web videos:

lib/ajax/addVideo.php

replace bth instances of
Code
intval(get_option('videos-initial'))

with
Code
$initial

and at the top of the files, after
Code
require_once('../../load.php');

you can do

Code
if(is_admin()) { $initial = 1;} else { $initial = 0;}
Same for other pages.
Code
lib/upload{and + something}

Logged

megaman79  July 31, 2014, 11:08:48 PM

if(is_admin()) { /* It's an admin */}

Example for web videos:

lib/ajax/addVideo.php

replace bth instances of
Code
intval(get_option('videos-initial'))

with
Code
$initial

and at the top of the files, after
Code
require_once('../../load.php');

you can do

Code
if(is_admin()) { $initial = 1;} else { $initial = 0;}
Same for other pages.
Code
lib/upload{and + something}


Hello Alexander, Thanks. can you make it more simple, step by steps . Which file I need to edit..etc I don't know that much.
What do you mean with: Same for other pages.

Audio Upload section for example ?

Logged
"Very Happy with PHPVibe"


Alexander  July 31, 2014, 11:22:01 PM

I've just explained you step by step...

Logged

hexertem  April 06, 2015, 08:23:00 AM

Hi Alex. Can you help me about this?

Can you describe the individual ?
aswell ...

Logged


Wnux  April 06, 2015, 06:14:10 PM


Hello Alexander, Thanks. can you make it more simple, step by steps . Which file I need to edit..etc I don't know that much.
What do you mean with: Same for other pages.

Audio Upload section for example ?


lib/ajax/addVideo.php

home(phpvibe) /lib/ajax/addVideo.php

 ;)

Logged


Alexander  April 06, 2015, 06:20:23 PM

Hi Alex. Can you help me about this?

Can you describe the individual ?
aswell ...

Hi, what individual? Is the same code change for every page.

Logged

hexertem  April 27, 2015, 07:56:03 AM

I'm just so I can see the notification (activity) screen. You will see other users.

Logged


hexertem  April 27, 2015, 08:15:29 AM

I'm just so I can see the notification (activity) screen. You will see other users.

Logged


Alexander  April 28, 2015, 05:23:26 PM

I don't understand...what are you trying to say about activity?

Logged

hexertem  April 28, 2015, 08:52:21 PM

I don't understand...what are you trying to say about activity?

User1 not look (not view).

User2 private

Logged


Alexander  April 30, 2015, 02:18:27 PM

I understand, so you are trying to say only the user should see his own activity, right?

Logged

hexertem  April 30, 2015, 05:26:41 PM

I understand, so you are trying to say only the user should see his own activity, right?

Yes...

I need to do? Php code.

Logged


Alexander  May 02, 2015, 05:29:36 PM

You can wrap link and activity in

Code
<?php if(is_powner()) { ?>

existing code
Code
<?php } ?>


Logged

hexertem  May 02, 2015, 05:58:30 PM

You can wrap link and activity in

Code
<?php if(is_powner()) { ?>

existing code
Code
<?php } ?>

Thank you Alex..

Logged


max18121980  May 02, 2015, 06:07:05 PM

How to remove a mandatory description for editing MP3

Logged


max18121980  May 02, 2015, 11:16:39 PM

And another thing: how to change the number of pages to an endless scrolling

Logged


Alexander  May 03, 2015, 06:42:11 PM

How to remove a mandatory description for editing MP3

A field is mandatory if it has the class
Code
validate[required]
if you remove this from input's class it's done.

tpl/main/manager.php

Code
<textarea rows="5" cols="5" name="description" class="auto validate[required] span12" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 88px;"><?php echo $video->description; ?></textarea>					

Logged

Alexander  May 03, 2015, 06:44:02 PM

And another thing: how to change the number of pages to an endless scrolling

Depends on page/selector.

Logged

max18121980  May 03, 2015, 08:04:40 PM

I removed and I get the code, but still asks description

<textarea rows="5" cols="5" name="description" class="auto validate[required] span12" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 88px;"><?php echo $video->description; ?></textarea>               

Logged


Alexander  May 04, 2015, 09:18:17 PM

Clear browser cache.

Logged

max18121980  May 05, 2015, 12:10:06 AM

Thank you. I think you made a mistake in finding the file. It was necessary to remove the code in moderator/edit-video.php :)

Logged


Alexander  May 05, 2015, 06:27:09 PM

You didn't explain where, so I tought in front-end :) My bad!

Logged