Button and Link [Module]
Author Message
c0rrupt
Administrator


Posts: 250
Joined: Mar 2010
Post: #1
Button and Link [Module]
0
0
Button and Link [Module] by jomasaco

1.)
Open wcfg.php

Find:
$this->sitepath =

After add (and change to your info) this:
$this->sitename = "YOUR SITE NAME"; //The site Name
$this->site_button = "http://YOUR BUTTON IMAGE.URL"; //The site Button Url

2.)
Create an new txt file and rename to wcddl_butoncode.php
Inside paste the following:
<?php
/*BEGIN_INFO
This module will show the Link Back codes, www.stugas-ddl.org
END_INFO*/
if(!defined("WCDDL_GUTS"))
   exit;
$modEnabled = true; //Change to false if don't use
    if($modEnabled) {
$code = '<!--Start '.$core->sitename.'--><a href="'.$core->siteurl.'" target="_blank" title="'.$core->sitename.'"><img src="'.$core->site_button.'" alt="'.$core->sitename.'" width="88" height="31" border="0"></a><!--End '.$core->sitename.'-->';
$code_txt = '<!--Start '.$core->sitename.'--><a href="'.$core->siteurl.'" title="'.$core->sitename.'" target="_blank">'.$core->sitename.'</a><!--End '.$core->sitename.'-->';

$codehtml = '<table width="100%" border="0">
   <tr><td colspan="2">We require the use of the button on pages if other DDL buttons are present else you are free to use only the text link.</td></tr>
   <tr><td>Your button:</td><td>'.$code.'</td></tr>
   <tr><td colspan="2"><textarea readonly="readonly" rows="4" cols="50">'.$code.'</textarea></td></tr>
   <tr><td>Your Text Link:</td><td>'.$code_txt.'</td></tr>
   <tr><td colspan="2"><textarea readonly="readonly" rows="3" cols="50">'.$code_txt.'</textarea></td></tr></table>';
  
$core->setTemplateVar("butoncode",$codehtml);
}
?>

Save and upload to your modules folder.

Add the following to where you want it to show:
<?=$core->templateVar("butoncode")?>

Example:






Be sure to visit WCDDL.org Affiliates
10-24-2010 12:21 PM
Mr. Chinn
WCDDL VIP


Posts: 23
Joined: Jul 2012
Post: #2
Button and Link [Module]
0
0
<?php
/*BEGIN_INFO
This module will show the Link Back codes, www.stugas-ddl.org
END_INFO*/
if(!defined("WCDDL_GUTS"))
   exit;
$modEnabled = true; //Change to false if don't use
    if($modEnabled) {
$code = '<!--Start '.$core->sitename.'--><a href="'.$core->siteurl.'" target="_blank" title="'.$core->sitename.'"><img src="'.$core->site_button.'" alt="'.$core->sitename.'" width="88" height="31" border="0"></a><!--End '.$core->sitename.'-->';
$code_txt = '<!--Start '.$core->sitename.'--><a href="'.$core->siteurl.'" title="'.$core->sitename.'" target="_blank">'.$core->sitename.'</a><!--End '.$core->sitename.'-->';

$codehtml = '<table width="100%" border="0">
   <tr><td colspan="2">We require the use of the button on pages if other DDL buttons are present else you are free to use only the text link.</td></tr>
   <tr><td>Your button:</td><td>'.$code.'</td></tr>
   <tr><td colspan="2"><textarea readonly="readonly" rows="4" cols="50">'.$code.'</textarea></td></tr>
   <tr><td>Your Text Link:</td><td>'.$code_txt.'</td></tr>
   <tr><td colspan="2"><textarea readonly="readonly" rows="3" cols="50">'.$code_txt.'</textarea></td></tr></table>';
  
$core->setTemplateVar("butoncode",$codehtml);
}
?>

Above is the code that worked for me. I don't remember who gave me the code.






07-04-2012 09:50 PM
c0rrupt
Administrator


Posts: 250
Joined: Mar 2010
Post: #3
Button and Link [Module]
0
0
Thanks Mr. Chinn. First post updated with your code

Be sure to visit WCDDL.org Affiliates
07-04-2012 09:55 PM


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Report Download [module] jomasaco 1 146 12-25-2011 10:24 PM
Last Post: WJManiaC
  Show site Downloads/Rank [module] c0rrupt 9 508 12-25-2011 01:41 AM
Last Post: WJManiaC
  Top Searches - Module c0rrupt 0 124 11-07-2010 02:21 PM
Last Post: c0rrupt
  Show Top 10 Downloads by Views [module] c0rrupt 0 100 11-07-2010 02:19 PM
Last Post: c0rrupt
  Show Date [Module] c0rrupt 0 97 11-07-2010 06:23 AM
Last Post: c0rrupt
  Easy Link Exchange [Module] c0rrupt 0 100 10-25-2010 06:29 PM
Last Post: c0rrupt



User(s) browsing this thread: 1 Guest(s)

This forum uses Lukasz Tkacz MyBB addons.