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.
Pages: 1
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
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
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
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
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
Offline
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
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...
BTW I LOVE MY AVATAR! it's way better than symtab's! LOL
Offline
DUDE...Cameron Diaz bouncing her ass...is like priceless :-)))) Or is that Drew Barrymore? I dont think it matters, my avatar is the best )))))))
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
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
My avatar is better then Symtab's! Or do I have to take off the bra to compete??? lol
Offline
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"
@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!
Last edited by pctv (2011-04-07 04:29:17)
Offline
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
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
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
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
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
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
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
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
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
Pages: 1