Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2011-04-04 08:03:57

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Questions about CDN

Hi,

I have a few questions about CDN:

1. When using CDN should it be enabled for everything? (template css/js/images, photo media, video media, pornstar media, user media...everything?)
2. Should there be some method to actually have the posibility to use a separate server for thumbs (video, photos, pornstar) (like nginx static/images)?

This is mostly important in the long run, as you wont need separate servers or CDN until you get tons of visitors.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#2 2011-04-04 08:05:54

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Questions about CDN

This is the last feature before RC1, so we're almost there.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2011-04-04 10:44:45

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Questions about CDN

Here's what i have until now:

- CDN_URL used for template js/css/images (basically this is the same, however if separate server is defined or cdn, the TPL_REL constant
will have the value defined for separate server/cdn).

- THUMB_URL used for video thumbs (by default this is RELATIVE_URL.'/media/videos/tmb/, if you use a separate server or CDN this constant
will change). FTP credentials can be configured in admin (thumbs will be automatically uploaded to separate server/CDN, or deleted when the
delete command is issued).

- PHOTO_URL used for photos (by default this is RELATIVE_URL.'/media/photos/, if you use a separate server or CDN this constant
will change). FTP the same as for THUMB_URL.

- MODEL_URL used for model images (by default this is RELATIVE_URL.'/media/pornstars/, if you use a separate server or CDN this
constant will change). FTP the same as for THUMB_URL.

There are 3 posibilities:
1. No CDN and no separate servers (basically all the urls remain the ABSOLUTE ones to the current domain).

2. Separate server for images (in this case the credentials for FTP to upload images can be configured from admin
and the urls can be defined in a file (urls cant be defined in admin, because this would slow things down, if you already
have enough content/visitors that you need separate servers for images, you can modify a file or someone to do it for you)

3. CDN server, now there are more than one way to get your files on the CDN server, however we will use FTP as its the most
common one (so basically all that is explained at 2 will also work). If you use CDN you will need to include a new file (file
is written and has documentation) and also add settings for FTP in admin.

So i will modify the templates and add small code snippets for FTP upload/delete.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#4 2011-04-04 10:45:32

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Questions about CDN

Please let me know what you think about this (this wont be useful right when you start a adult tube site, however once you get a lot of visitors and content, this will be very very useful).


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#5 2011-04-04 11:14:26

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Questions about CDN

This is the file that will define the URLs:

defined('_VALID') or die('Restricted Access!');

// This file is used to configure CDN, every option is documented. Please read carefully
// before enabling anything in this file. Every file needs to preserve the orignal path
// on the remote server, eg: if you use a separate server, the path for model images will
/// need to be http://model.domain.com/media/pornstars/.

/**
 * CDN_URL will define the CDN URL or SEPARATE SERVER url for you CSS, Javascript and Image
 * files that can be found in /templates/your-template/{css,js,images}. These files need to
 * be uploaded manually to your CDN server (service), before you can use this feature.
 *
 * Uncomment the line below to enable CDN/Separate Server.
 */
//define('CDN_URL', 'http://static.domain.com');

// documentation to come, this is basically same as multi-server
//define('CDN_VIDEO_URL', '');

/**
 * CDN_THUMB_URL will define the CDN URL or SEPARATE SERVER url for your video thumbs. You can
 * configure the separate server FTP or CDN server credentials in:
 *
 * Admin -> Video -> Configure -> Thumbs
 *
 * Uncomment the line below to enable CDN or Separate Server for video thumbs
 *
 */
//define('CDN_THUMB_URL', 'http://thumbs.domain.com');

/**
 * CDN_PHOTO_URL will define the CDN URL or SEPARATE SERVER url for your photo images. All images
 * related to photos will be served from the URL defined here (including photo thumbs, album covers,
 * resized photos, original photos). You can configure the separate server FTP or CDN credentials in:
 * 
 * Admin -> Photo -> Configure -> Upload
 *
 * Uncomment the line below to enable CDN or Separate Server for photos
 *
 */
//define('CDN_PHOTO_URL', 'http://images.domain.com');

/**
 * CDN_MODEL_URL will define the CDN URL or SEPARATE SERVER url for your model images. All images
 * related to models will be server from the URL defined here. You can configure the separate server
 * FTP or CDN FTP credentials in:
 * 
 * Admin -> Model -> Configure -> Photo
 *
 * Uncomment the line below to enable CDN or Separate Server for model images
 *
 */
//define('CDN_MODEL_URL', 'http://models.domain.com');

Probably will also add a separate URL for user avatars.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#6 2011-04-04 12:08:50

Eri
Member
Registered: 2011-03-18
Posts: 977

Re: Questions about CDN

For my site i am using CDN for images and CSS. Is very expencive to use a CDN for video streaming. For video streaming i am using dedecated servers.


Best Adult Affilitate Network:
ExoClick
Best Deals on Dedicated Servers - CDN
INXY

Offline

#7 2011-04-04 13:27:04

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Questions about CDN

We already have the dedicated servers support (with multi-server), so i only add CDN for the rest.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#8 2011-04-05 07:09:06

pctv
Member
Registered: 2011-03-24
Posts: 34

Re: Questions about CDN

Yo! it is true that it is very expensive to have video streaming for CDN, but this is what big guys do! If you want to make your users happy then you do not want them to keep waiting for your video to buffer every single minute...

wink

BTW I LOVE MY AVATAR! it's way better than symtab's! LOL

Offline

#9 2011-04-05 08:19:58

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Questions about CDN

DUDE...Cameron Diaz bouncing her ass...is like priceless :-)))) Or is that Drew Barrymore? I dont think it matters, my avatar is the best smile)))))))

PS: Maybe we get some celebrity hits to the forum :-)


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#10 2011-04-05 12:56:41

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Questions about CDN

I've thaught about this today, so basically to completly integrate a way to have CDN you would need to modify a lot of files, which would slow down the script for people
that dont use CDN or separate servers. So i'm gonna partially integrate it and when the time comes for someone to actually use CDN for everything, i'll make the modifications
only on his/her site.

I have modified the templates, in such a way that in case someone uses separate servers/CDN no template modifications will be required. You just need to edit a file to define
the urls.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#11 2011-04-05 13:17:42

Pornogoddess
Member
From: NY
Registered: 2011-01-12
Posts: 183
Website

Re: Questions about CDN

My avatar is better then Symtab's! Or do I have to take off the bra to compete??? lol

Offline

#12 2011-04-07 04:27:54

pctv
Member
Registered: 2011-03-24
Posts: 34

Re: Questions about CDN

pornogoddess is that really yours and are you really a girl? if so.. you are the second girl that I know that is in the field of porn business..

I mean that is "HOT"

big_smile

@Adrian

I think you are right... If a site is fresh and brand new and only gets a few visitors then CDN is not recommended...

But if the site owner is "SERIOUS" about getting the project to work out then... CDN is a MUST!

smile

Last edited by pctv (2011-04-07 04:29:17)

Offline

#13 2011-04-07 11:08:35

mfeat50
Member
Registered: 2010-10-25
Posts: 114
Website

Re: Questions about CDN

Pornogoddess wrote:

My avatar is better then Symtab's! Or do I have to take off the bra to compete??? lol


ummmm it wouldn't hurt.... LOL

Offline

#14 2011-04-07 11:12:09

mfeat50
Member
Registered: 2010-10-25
Posts: 114
Website

Re: Questions about CDN

CDN is something I think some of us will use in the future for sure and I am glad to see that Adrian will make the modifications only on a site by site basis. It is something I am sure I will be doing if the future.

Offline

#15 2011-04-07 14:16:48

Pornogoddess
Member
From: NY
Registered: 2011-01-12
Posts: 183
Website

Re: Questions about CDN

lol, yes it's me. I"ll make up a sign a little later that says "Symtab" on it. If I'm lucky, he'll make it his Avatar. *wink*

I need to find a way to tell my users that I'm the one running the site as soon as they go on it. Was thinking a little ad space in Recent Viewed with a picture of me holding a piece of paper? Any suggestions?

I like porn just as much as a man does, it's not a bad thing, right? :-D

By the way guys, it'd be nice if we could all talk to each other on ICQ as well - mine is 645594353

Offline

#16 2015-09-21 18:47:24

franz
Member
Registered: 2014-07-09
Posts: 29

Re: Questions about CDN

I did define this

define('CDN_THUMB_URL', 'http://thumbs.domain.com');

but the THUMB_URL did not change to the defined CDN_THUMB_URL

its still showing the default relative url

<img src="<?php echo THUMB_URL,'/',path($video['video_id']),'/',$video['thumb']; ?>.jpg" alt="<?php echo e($video['title']); ?>" id="preview-<?php echo $video['video_id'],'-',$video['thumb'],'-',$video['thumbs']; if (isset($this->id)): echo $this->id; endif; ?>" />

how to fix?

Offline

#17 2015-09-21 19:15:32

franz
Member
Registered: 2014-07-09
Posts: 29

Re: Questions about CDN

this is my temporary fix

edited bootstrap.php

$cdn_thumb_url = "http://my-url-here.com/";
define('THUMB_URL', (defined('CDN_THUMB_URL')) ? CDN_THUMB_URL : $cdn_thumb_url.'/videos/tmb');

Offline

#18 2015-09-22 05:40:38

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Questions about CDN

Is this in the last version of the script?


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#19 2015-09-22 09:10:31

franz
Member
Registered: 2014-07-09
Posts: 29

Re: Questions about CDN

symtab wrote:

Is this in the last version of the script?

yes I have tested it both before and after upgrade.. can you verify at your dev site pls

thanks

Offline

#20 2015-09-23 05:43:20

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Questions about CDN

In the current version of the script, you edit libraries/cdn.php and set the CDN_THUMB_URL and then edit libraries/bootstrap.php and uncomment the require 'cdn.php' file. Thats it.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#21 2015-09-23 15:19:08

franz
Member
Registered: 2014-07-09
Posts: 29

Re: Questions about CDN

symtab wrote:

In the current version of the script, you edit libraries/cdn.php and set the CDN_THUMB_URL and then edit libraries/bootstrap.php and uncomment the require 'cdn.php' file. Thats it.

thanks for reminding.. I did not notice that commented require cdn.php in bootstrap .. it works now..

Last edited by franz (2015-09-23 15:19:57)

Offline

Board footer

Powered by FluxBB