Results 11 to 20 of 20
-
12th Jun 2011, 04:08 PM #11MemberWebsite's:
zomgbbqpizza.com evilddl.com scenemarket.orgLooking forward to the final release of this. Have been out of the scene for a long time and plan to rebuild EViLDDL using WCDDL v3 instead of DDLCMS like last time. Just hoping a lot of the mods are updated as I'm very much out of practice with PHP, not touched anything for around two years now :-/
-
21st Jun 2011, 07:48 PM #12Member
Let see if i understand whow this works
PHP Code:<?php
// Backlink check
// Coded by JmZ
// LOLLERSKATES
//added looking in download page by moi
if(!defined("WCDDL_GUTS"))
exit;
// Set the following to true to enable this mod
// Be sure to change yoursite.com below
$modEnabled = false;
function backlinkCheck($submit) {
// Change the domain below to yours
$myURL = 'yoursite.com';
// FGC can be slow, replace with curl if you want
// Also, this is only a simple check so not always reliable
$get = file_get_contents($submit->surl);
if(!preg_match('#href="http://(www\.)?' . $myURL . '/?"#i', $get))
$get = file_get_contents($submit->url[0]);
if(!preg_match('#href="http://(www\.)?' . $myURL . '/?"#i', $get))
$submit->error = 'No backlink detected.';
}
if($modEnabled)
Core::load()->hook('SubmitValidation', 'backlinkCheck');
-
17th Jul 2011, 11:18 AM #13MemberWebsite's:
PremiumRDA.com
-
7th Dec 2011, 04:07 AM #14BannedWebsite's:
upsharez.in warez-site.comwcdd v3 script
where i can find wcddl v3 skin?
-
15th Jan 2012, 09:16 PM #15Banned
I want to create a custom field in the downloads table , I updated the table and have also written the function but I cant understand what exactly to hook so that it takes the sql query of the new field .
How to change the query and params in DownloadsSavePre before it is executed ?
-
15th Jan 2012, 10:41 PM #16OP(╯?□?)╯︵ ┻━┻Website's:
Xenu.ws WarezLinkers.com SerialSurf.com CracksDirect.comI didn't code that specific hook as well as I could have, so it may seem a bit hacky but here's how:
- Hook into DownloadsSavePre
- Your function will be given the query string and the parameters
- ($sql, Array $params)
Basically you'd have to replace some common substring with the original and your new fields.
Like so:
PHP Code:$sql = str_replace(') VALUES', ',d, e, f) VALUES', $sql);
INSERT INTO wcddl_downloads (a,b,c) VALUES (:a, :b, :c)
The result of replacing ') VALUES' would be:
INSERT INTO wcddl_downloads (a,b,c,d,e,f) VALUES (:a, :b, :c)
Then do the same for the values:
PHP Code:$sql = str_replace('VALUES (', 'VALUES (:d, :e, :f, ', $sql);
INSERT INTO wcddl_downloads (a, b, c, d, e, f) VALUES (:a, :b, :c, , :e, :f)
Remember all fields must be prefixed with 'd.', e.g. 'd.title' rather than 'title'.
When I get around to it, i'll update it slightly to have better hook handling for this.Projects:
WCDDL - The Professional DDL Script
Top Secret Project: In Development - ZOMG
ImgTrack - Never Have Dead Images Again!
-
16th Jan 2012, 10:23 AM #17Banned
Thank You
-
30th Jan 2012, 01:33 AM #18OP(╯?□?)╯︵ ┻━┻Website's:
Xenu.ws WarezLinkers.com SerialSurf.com CracksDirect.com3.1 has been uploaded now onto github.
The only changes are dev related.
Queries generated, simplified
Certain queries are now generated and have their own hooks. The following methods were introduced:
PHP Code:Database::insert($table, $map[, $returnID]);
Database::update($table, $map[, $criteria]);
Database::delete($table[, $map]);
// Examples of usage:
Database::insert(WCDDL_DB_PREFIX . 'whitelist', array(
'url' => $someSite,
));
// The above will insert a row into the whitelist table
The following hooks now exist:
Code:DownloadQueueInsert // Called when a download is added to the queue, array of params is passed, see Database::insert() usage DownloadDeQueueDelete // Called when a queue entry is removed, params/criteria passed DownloadDeleteDelete // Called when a download is deleted, params passed, see Database::delete() usage DownloadSaveUpdate // Called when a download is updated in the db, see Database::update() usage DownloadSaveInsert // Same as above but insertions, not updates SiteSaveUpdate // Called when a site is updated in the db SiteSaveInsert // Called when a site is added to the db
In your modules now, if you'd like to alter one of these queries, you simply change the params.
So say you added a field to the downloads table, you hook into DownloadSaveUpdate & DownloadSaveInsert, then add your field to the parameters array.
Meaning:
PHP Code:function test($map) {
$map['myField'] = 'someValue';
}
Core::load()->hook('DownloadSaveInsert', 'test');
Projects:
WCDDL - The Professional DDL Script
Top Secret Project: In Development - ZOMG
ImgTrack - Never Have Dead Images Again!
-
28th Feb 2012, 09:49 PM #19BannedWebsite's:
WarezRelease.org ThatHosting.coHow to display stuff from DB?
-
25th Jan 2014, 09:09 AM #20Probation
This code help full for me.
Mobile Website Builder
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
WCDDL Modules, Plugins and Extensions
By Mr Happy in forum Webmaster ResourcesReplies: 151Last Post: 15th Nov 2012, 04:54 PM -
[For Hire] Python Development | xChat Plugin Development
By Gaurav in forum Completed TransactionsReplies: 5Last Post: 5th Oct 2011, 08:12 AM -
WCDDL Modules
By Peach in forum Forum and DDL DiscussionReplies: 3Last Post: 21st Jun 2011, 01:19 PM -
2x Custom modules, black/whitelist WcDDL
By Chris2k in forum Webmaster ResourcesReplies: 0Last Post: 21st May 2011, 01:01 AM -
IPB 3.x - Moving hooks
By Golden Falcon in forum IP.BoardReplies: 1Last Post: 20th Mar 2010, 04:24 PM
themaCreator - create posts from...
Version 3.22 released. Open older version (or...