WCDDL Modules, Plugins and Extensions

Status
Not open for further replies.

Mr Happy

Active Member
4,093
2009
2,572
0
WCDDL Version 3 Modules, Plugins and Extensions


Now that WCDDL version 3 has got it's full release I've decided to start releasing plugins and modules for it. This thread contains WCDDL Modules, Plugins and Extensions for Version 3 only so no support will be given to Version 2. V3 is far faster, safer and easier to use so I'd advise you to consider upgrading. The modules and plugins available will be far superior to V2 as well. All plugins and modules in this thread will require the Plugin Manager below to be installed.
All the modules are designed so you can modify the appearance in the CSS file or the settings. You should never have to do manual edits on the modules. If you've questions just ask.

v1leU.png


WCDDL Plugin Manager

Info
The plugin manager allows you to install, change settings and update other plugins easily. To install just upload it to your modules folder and go to http://exmaple.com/wc3admin.php?go=installpluginManager

Download

https://rapidshare.com/files/2157303402/wcddl_pluginManager.zip
 
Last edited:
156 comments
Extra Module for v3 by immu

Info: Extra module which was installed on almost like every DDL site so taught, to make it work on v3.

ScreenShots:

20120220115300.png


20120220115313.png


20120220115322.png


20120220115330.png



Install:

Open Index.php

Find:
PHP:
<td>Views</td>

Replace
PHP:
<td>Extra</td><td>Views>


Find:
PHP:
<td><?php echo $row->views?></td>

Before Add:

PHP:
<td class="extra">
<?php 
                if($row->type == "Movie") { 
                echo '<a  href="http://www.imdb.com/find?s=all&q='.$row->title.'"  target="_blank"><img  src="http://localhost/new%20folder/images/imdb.png" height=16"  width="16" border="0" alt="'.$row->title.'" title="View Info about  '.$row->title.' "/></a>'; } 
                elseif($row->type == "TV") { 
                echo '<a  href="http://tvdb.com/search/'.$row->title.'"  target="_blank"><img  src="http://localhost/new%20folder/images/tv.png"  alt="'.$row->title.'" title="View Info about '.$row->title.'  "/></a>'; } 
                elseif ($row->type == "Game") { 
                echo '<a  href="gamespot.com/search.html?qs='.$row->title.'"  target="_blank"><img  src="http://localhost/new%20folder/images//games.png"  alt="'.$row->title.'" title="Search in Google '.$row->title.'  "/></a>'; }
                else { 
                echo '<a  href="http://google.com/?q='.$row->title.'"  target="_blank"><img  src="http://localhost/new%20folder/images/google.png"  alt="'.$row->title.'" title="Search in Google '.$row->title.'  "/></a>'; }
            ?>
</td>


NOTE: change image path


Upload these Images in Images Folder

imdbh.png
googlenc.png
31748258.png
gamey.png



Open Style.css

PHP:
.extra
{
opacity:0.4;
filter:alpha(opacity=40); /* For IE8 and earlier */
}
.extra:hover
{
opacity:1.0;
filter:alpha(opacity=100); /* For IE8 and earlier */
}
 
@Mr Happy
You might want to fix a slight bug in the Filehost module while checking for backlink

If a website has code like this:
Code:
<a href="http://someanotherddl.com" rel="nofollow">SomeAnotherDDL</a><a href="http://www.google.com">Google</a>
And the website to check for backlink is google.com
Then the module will show as nofollow.
Example:
PHP:
<?php

function backlink($page, $data) {
        if(!$page || !$data)
            return 'error';
        $page = strtolower($page);
        $regex = '<a(.*)'.$data.'(.*)>';
        preg_match($regex, $page, $match);
        if($match) {
            if ((strpos($match[1], 'nofollow') || strpos($match[2], 'nofollow')))
                return 'nofollow';
            return false;
        }
        else
            return 'backlink';
}

echo backlink('<a href="http://someanotherddl.com" rel="nofollow">SomeAnotherDDL</a><a href="http://www.google.com">Google</a>',  'google.com');
    
?>
 
Last edited:
When I want to install the WCDDL Plug-in Manager it does not work.
I know that the path to the modules folder is correct because when I go to the modules tab in the acp the modules are showing.

And after the file upload to the modules folder and pointing my browser to :
http://myURL/wc3admin.php?go=installpluginManager
It does not do anything :facepalm:
I need these answered in order to help you:
  1. Do you see the plugin manager in the modules tab in the acp after you uploaded it?
  2. Did it say it installed the plugin manager when you followed the link?
  3. Do you see the link to the Plugin Manager on the navigation in the ACP (try hard refresh / login and logout / clear cache)?
 
OK that's weird. Assuming you didn't rename or edit files then the problem is the url your trying to use to install it. Whatever way you changed example.com to yoursite.com didn't work.

Try and do it this way. Login to your WCP and as soon as you've logged in then add ?go=installpluginManager to the end of the URL.
 
I was wondering if there is any .php to .html rewrite rule for V3?
In the htaccess for V2 there was something like:
Code:
RewriteRule ^download-([^/]+)-([^/]+)\.html download.php?id=$1 [QSA,L,NC]
but I'm facing some problems getting it to work on the index.php.
It would be awesome if there will be some plugin able to rewrite download links to this:
site/category/id-downloadname.html
Thanks in advance
 
I'm sorry but I just tried it and that does not work either.
Dam I've no idea what's wrong. Are you sure it's version 3 you installed and not version 2 or where is this installed? Localhost or a server? If it's a server you can PM me details if you want me to have a look

I was wondering if there is any .php to .html rewrite rule for V3?
In the htaccess for V2 there was something like:
Code:
RewriteRule ^download-([^/]+)-([^/]+)\.html download.php?id=$1 [QSA,L,NC]
but I'm facing some problems getting it to work on the index.php.
It would be awesome if there will be some plugin able to rewrite download links to this:
site/category/id-downloadname.html
Thanks in advance
Ya their is. It's in the config file. You can also modify the htaccess to match how you change the config. It's not to hard but that's more of a tutorial you have to follow rather than a plugin as it requires template edits so that's a different topic. I do have an Advanced SEO module which I'll release soon and I'll include re-writes in that if nobody makes a tutorial in the meantime. You can develop your website though as that's something you can do later. Take WJunction as an example. That was getting thousands of visitors and was about 4 years old before it introduced url rewrites.
 
Last edited:
Ya their is. It's in the config file. You can also modify the htaccess to match how you change the config. It's not to hard but that's more of a tutorial you have to follow rather than a plugin as it requires template edits so that's a different topic. I do have an Advanced SEO module which I'll release soon and I'll include re-writes in that if nobody makes a tutorial in the meantime. You can develop your website though as that's something you can do later. Take WJunction as an example. That was getting thousands of visitors and was about 4 years old before it introduced url rewrites.


Thanks for the config file hint. Looking forward to the SEO plugin. :)
 
Extra's module

Extra's Module re-coded by mgmaik.
(No idea who coded this first. Please let me know.)

Info:
Shows extra download information.
It's a really easy module. Didn't took me very long to understand with no php skills.

Screenshots:
5zp3rb.png


Download:
https://rapidshare.com/files/3874607041/wcddl_extra.php

Install:
Add wcddl_extra.php in your Modules folder
works perfect with Mr Happy Plugin Manager.

Browse to index.php
Find:
Code:
<td>Views</td>
Replace
Code:
<td>Extra</td><td>Views>

Find:
Code:
<td><?php echo $row->views?></td>
Add before:
Code:
<?php echo $row->extra; ?>

Upload your IMDB, GOOGLE, GAMETRAILERS icon.

Open your Style.css
Add:
Code:
.extra{opacity:0.3;filter:alpha(opacity=30);margin-top:3px;background-color:transparent;}
.extra:hover{opacity:1.0;filter:alpha(opacity=100);margin-top:3px;}
.extra.imdb{height:16px;width:16px;background-image:url("http://www.your.uploaded.imdb.icon.png");}
.extra.google{height:16px;width:16px;background-image:url("http://www.your.uploaded.google.icon.png");}
.extra.gametrailers{height:16px;width:16px;background-image:url("http://www.your.gamtrailers.imdb.icon.png");}

CSS Tip:
Making an image sprite will increase loading time but requires more css skills.

De-activate:
simply change this:
Code:
$modEnabled = true;
to this:
Code:
$modEnabled = false;

Note:
Adding more extra's possible too. But requires some php and css skills.
Or just ask me.
 
Last edited:
when trying to install ACP i get:

Error
You need to have the WCP (Webmaster Control Panel) by Mr Happy installed to enable this feature.
 
when trying to install ACP i get:

Error
You need to have the WCP (Webmaster Control Panel) by Mr Happy installed to enable this feature.
When trying to install? Don't you mean when trying to change/update the settings and options?

That's added to future proof it for when I release my WCP Module. Just uncheck the WCP checkbox in the settings and save/update them. Obviously you can't enable the WCP as it's not even released. That setting will only become available when I release the WCP and you've it installed. It doesn't affect anything else.
 
Hi,

Which plugin will show the downloads for an specific site?

http://www.domain.com/index.php?site=mydomain.com

Thanks

---------- Post added at 05:33 PM ---------- Previous post was at 04:18 PM ----------

nvm,

I added a query to wc3.php and it works.
AFTER
PHP:
class Downloads {
    public $page = 1;
    public $perPage = 30;
    public $query;
    public $type;
ADD new variable
PHP:
    public $site;
AND AFTER
PHP:
        if(!empty($this->type)) {
            $where .= (empty($where) ? ' WHERE' : ' AND') . ' d.type = :type';
            $whereParams['type'] = $this->type;
        }
ADD
PHP:
        if(!empty($this->site)) {
            $where .= (empty($where) ? ' WHERE' : ' AND') . ' s.url = :site';
            $whereParams['site'] = $this->site;
        }
I changed Index.php also

FROM
PHP:
$downloads = Core::load()->mapRequest('Downloads', array('page', 'query', 'type'));
TO

PHP:
$downloads = Core::load()->mapRequest('Downloads', array('page', 'query', 'type', 'site'));
:sun:

---------- Post added at 05:53 PM ---------- Previous post was at 05:33 PM ----------

Ahhhhh, but Pages number is not showing lol plz tell me how to fix that
 
Last edited:
@resoft11
Code:
MISSING:
alteration who need to be done at index.php
$downloads = Core::load()->mapRequest('Downloads', array('page', 'query', 'type', 'site'));  <- site on array
echo $downloads->pages(array(
            array('default', WCDDL_PAGES_DEFAULT),
            array('query', WCDDL_PAGES_QUERY),
            array('type', WCDDL_PAGES_TYPE),
            array(array('query', 'type'), WCDDL_PAGES_QUERY_TYPE),
            [COLOR="Lime"]array('site', WCDDL_PAGES_SITE)[/COLOR]  <------------------------------------------------------ site to pagination
        ));
if uses the noxxx mod change one line
if((empty($type) && !isset($_GET['q']) && !isset($_GET['page']) && !isset($_GET['site'])) || (!isset($_GET['site']) && isset($_GET['page']) && $this->dontshow && $type != 'xxx')) {

(code from jomasaco)

Jomasaco released a module of that. I believe it's called "wcddl_joma_site_downl.php"
It will show site page with a working pagination.

The module can be found on WCDDL skins forum
Can't find the link on wjunction anymore.

btw you shouldn't edit the wc3.php as it will make it harder to update wcddl script in the future. Best way is to use the module.
 
Last edited:
Wow, great mate.

You are right! i shouldnt edit wc3.php :D

But i dont know what is wrong with my modifiation, i can see that it works because i can access all pages manually by typing url with page number , just pagination for site downloads is not showing. I added there lines too

array('site', WCDDL_PAGES_SITE) -> index.php
and
define('WCDDL_PAGES_SITE', '<a href="/index.php?page=#page#&site=#site#">#page#</a>');

to wcfg.php

anyway, Thank alot @mgmaik
 
MrH, a small suggestion 4 ur plugin manager:

3hnjg.png


see the 1st arrow, Options, should only be available if mod is installed.

see the 2nd arrow, Install, should'nt be available if mod IS installed.

see the 3rd arrow, Uninstall should only be available if mod IS installed.
 
Status
Not open for further replies.
Back
Top