DataLife Engine English Support Site » DatalifeEngine Modules » The gallery mod
Welcome,. Enter Username, or register.
Login: password:  



ApadanaGroup's Hosting Services available now with Unbelievable LOW PRICES,
Unlimited SPACE AND Unlimited Transfer ....Check it out !!!
http://unlimitpackage.net/

The gallery mod

Author Tak, Category DatalifeEngine Modules9 April 2007.
Instructions included...but here they are anyway...

Upload all the files...

CHMOD uploads/gallery, temp, thumb, main folders 777.
show_galcat.tpl CHMOD 777.




Open /template-you-use/css/engine.css:
ADD:


.quick {
    color: #999898;
    font-size: 11px;
    font-family: tahoma;
    padding: 5px;
}

.quick h3 {
    font-size: 18px;
    font-family: verdana;
    margin: 0px;
    padding-top: 5px;
}

.galmain a:active,
.galmain a:visited,
.galmain a:link {
    color: #333333;
    text-decoration:none;
    }

.galpict {
    background-color:#F7F7F7;
    /*padding-left:30px;
    padding-right:25px;*/
    padding-top:3px;
    color: #717171;
    font-size: 11px;
    font-family: tahoma;
    
}

.galpict a:active,
.galpict a:visited,
.galpict a:link {
    color: #E34000;
    text-decoration:none;
}

.galpict a:hover {
    color: #E34000;
    text-decoration: underline;
}

.galcattable {
    border:1px;
}





Open engine/inc/options.php
FIND:

$options['user'] = array(

                    array(
                    'name'       => $lang['opt_priv'],
                    'url'        => "$PHP_SELF?mod=options&action=personal",
                    'descr'      => $lang['opt_privc'],
                    'image'      => "pset.png",
                    'access'     => "all",
                    ),

ADD AFTER:

           array(
                   'name'       => $lang['opt_gal'],
                   'url'        => "$PHP_SELF?mod=gallery",
                   'descr'      => $lang['opt_galc'],
                   'image'      => "iset.png",
                   'access'     => "1",
                    ),




Open admin.php
FIND:

'usergroup'    => 'admin',

ADD AFTER

'gallery'      => 'admin',
'gallery_pict' => 'admin',
'gallery_c'    => 'admin',



Open language/English/adminpanel.lng
Add to it:


'addnews_bild_img'    =>    "Add images to the gallery",
'opt_gal'        =>    "Datalife Image Gallery",
'opt_galc'        =>    "Image gallery settings and options",

Open website.lng
Add to it:

'fotoalbum'            =>    "Gallery",






OPEN PHPMYADMIN:
ADD THIS TO YOUR DATALIFE INSTALL DATABASE:


CREATE TABLE `dle_gal_cat` (
  `cat_id` mediumint(8) unsigned NOT NULL auto_increment,
  `pid` mediumint(8) unsigned NOT NULL default '0',
  `cat_title` varchar(255) NOT NULL default '',
  `cat_desc` text,
  `cat_order` mediumint(8) NOT NULL default '0',
  `cat_alt_name` varchar(50) NOT NULL default '',
  `us_cat` varchar(40) NOT NULL default '',
  `cat_status` smallint(5) NOT NULL default '0',
  `date` int(11) unsigned NOT NULL default '0',
  `img_number` smallint(5) NOT NULL default '0',
  `cat_view_level` varchar(200) NOT NULL default '0',
  `cat_upload_level` varchar(200) NOT NULL default '0',
  `cat_comment_level` varchar(200) NOT NULL default '0',
  `cat_edit_level` varchar(200) NOT NULL default '0',
  `cat_mod_level` varchar(200) NOT NULL default '0',
  `news_sort` varchar(15) NOT NULL default '',
  `news_msort` varchar(10) NOT NULL default '',
  `allow_rating` tinyint(1) NOT NULL default '1',
  `allow_comm` tinyint(1) NOT NULL default '1',
  `allow_wat` tinyint(1) NOT NULL default '1',
  `image` varchar(200) NOT NULL default '',
  PRIMARY KEY  (`cat_id`),
  KEY `cat_order` (`cat_order`)
) TYPE=MyISAM /*!40101 DEFAULT CHARACTER SET cp1251 COLLATE cp1251_general_ci */;


CREATE TABLE `dle_gal_com` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `post_id` int(11) NOT NULL default '0',
  `cat_id` mediumint(8) NOT NULL default '0',
  `date` datetime NOT NULL default '0000-00-00 00:00:00',
  `autor` varchar(100) NOT NULL default '',
  `email` varchar(100) NOT NULL default '',
  `text` text NOT NULL,
  `ip` varchar(50) NOT NULL default '',
  `is_register` smallint(3) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `post_id` (`post_id`)
) TYPE=MyISAM /*!40101 DEFAULT CHARACTER SET cp1251 COLLATE cp1251_general_ci */;


CREATE TABLE `dle_gal_log` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `pic_id` int(10) NOT NULL default '0',
  `member` varchar(40) NOT NULL default '',
  `ip` varchar(16) NOT NULL default '',
  `cat_id` mediumint(8) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM /*!40101 DEFAULT CHARACTER SET cp1251 COLLATE cp1251_general_ci */;


CREATE TABLE `dle_gal_pic` (
  `pic_id` int(11) unsigned NOT NULL auto_increment,
  `pic_title` varchar(255) NOT NULL default '',
  `pic_filname` varchar(50) NOT NULL default '',
  `pic_desc` text NOT NULL,
  `pic_user_id` varchar(40) NOT NULL default '0',
  `pic_time` int(11) unsigned NOT NULL default '0',
  `pic_cat_id` mediumint(8) NOT NULL default '0',
  `pic_view_count` int(11) unsigned NOT NULL default '0',
  `comm_num` smallint(5) unsigned NOT NULL default '0',
  `rating` smallint(5) NOT NULL default '0',
  `vote_num` smallint(5) unsigned NOT NULL default '0',
  `approve` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`pic_id`),
  KEY `pic_cat_id` (`pic_cat_id`),
  KEY `pic_user_id` (`pic_user_id`),
  KEY `pic_time` (`pic_time`)
) TYPE=MyISAM /*!40101 DEFAULT CHARACTER SET cp1251 COLLATE cp1251_general_ci */;




Open engine/inc/addnews.php
FIND:


if ($config['allow_admin_wysiwyg'] == "yes"){

include(ENGINE_DIR.'/editor/shortnews.php');


ADD AFTER:

echo <<<HTML
<a href=# class=main onclick="window.open('$PHP_SELF?mod=gallery_pict&action=links&area=short_story&author=$member_db[2]', '_Addimage', 'HEIGHT=550,left=0,top=0,resizable=yes,scrollbars=yes,WIDTH=560');return false;" target="_Addimage">[$lang[addnews_bild_img]]</a>
HTML;



Open .htaccess

FIND:

RewriteRule ^addnews(/?)+$ /?do=addnews

ADD AFTER

# Gallery
RewriteRule ^gallery(/?)+$ /?do=gallery [L]
RewriteRule ^gallery/page/([0-9]+)(/?)+$ /?do=gallery&cstart=$1 [L]
RewriteRule ^gallery/image/([0-9]+).html(/?)+$ /?do=gallery&action=img&image=$1 [L]
RewriteRule ^gallery/image/([0-9]+)/page/([0-9]+)(/?)+$ /?do=gallery&action=img&image=$1&cstart=$2 [L]
RewriteRule ^gallery/users(/?)+$ /?do=gallery&action=usgal [L]
RewriteRule ^gallery/users/page/([0-9]+)(/?)+$ /?do=gallery&action=usgal&cstart=$1 [L]
RewriteRule ^gallery/own/([^/]*)(/?)+$ /?do=gallery&action=usergal&user=$1 [L]
RewriteRule ^gallery/own/([^/]*)/page/([0-9]+)(/?)+$ /?do=gallery&action=usergal&user=$1&cstart=$2 [L]
RewriteRule ^gallery/category/([^/]*)(/?)+$ /?do=gallery&action=show_cat&category=$1
RewriteRule ^gallery/category/([^/]*)/page/([0-9]+)(/?)+$ /?do=gallery&action=show_cat&category=$1&cstart=$2 [L]


Open engine/engine.php

FIND

    case "pm" :
        include ENGINE_DIR.'/modules/pm.php';
        break;

ADD AFTER:

    case "gallery" :
        include ENGINE_DIR.'/gallery/gallery.php';
        break;




the gallery is done.
**The gallery link will be
http://www.yoursite.com/gallery/
or
http://www.yoursite.com/index.php?do=gallery




Random image on the frontpage in a module.

init.php

Find: if ($config['allow_banner'])
    include_once ENGINE_DIR.'/modules/banners.php';

Add AFTER:

require_once ENGINE_DIR.'/gallery/random_pict.php';

Open index.php

FIND:
$tpl->set('{topnews}',$topnews);

ADD AFTER:
$tpl->set('{random_pict}',$random);

Open the template you use main.tpl and add {random_pict} in a module! thats it.


Translated from russian badly lol.

mirrors:
You must register before you can view this text.
 
Your are currently a guest on this site. Please click here to register
  • views: 2487
  •  Print
    • 68
     (Votes #: 8)
  
  • Weed links in the static page
  • Two stage {login}: {login_if} and {login_else}
  • How to translate the calendar all versions
  • Online Module 2.2
  • Readmore (For News) with AJAX





  • User Group: Member
    Shit, links is dead. Someone give me a link, please.
    Joined: 28.04.2008 | ICQ: --


    User Group: Member
    reupload pls
    Joined: 22.02.2008 | ICQ: --
    #11 tack1


    User Group: Member
    file is deleted !!! plz upload now
    Joined: 15.02.2008 | ICQ: --


    User Group: Member
    reupload plz
    Joined: 11.02.2008 | ICQ: --


    User Group: Member
    hix , Link died ..... Plz reupload !! smile am Thank!!
    Joined: 12.02.2008 | ICQ: --


    User Group: Member
    but man file not found
    plzz reupload

    plzzzz
    Joined: 3.02.2008 | ICQ: --


    User Group: Member
    Hello!
    Warning: Missing argument 3 for ShortRating() in /home/centras/public_html/dle/engine/modules/functions.php on line 208

    This error appear because:
    in the gallery for DLE 5.3 - function ShortRating ($rating, $vote_num){

    in the gallery for DLE 6.2 - function ShortRating ($id, $rating, $vote_num, $allow = true)

    If rewrite in gallery's files: rating - pating, rate - pate,
    function ShortRating - function ShortPating.
    In functions.php - after ' function ShortRating()' write function ShortPating()

    Must be OK!
    Joined: 19.09.2007 | ICQ: 330415464
    #6 Ac3


    User Group: Member
    Does this work with DataLife Engine v6 ?? and many Thanks Great Job ..
    Joined: 1.07.2007 | ICQ: --


    User Group: Member
    Warning: Missing argument 3 for ShortRating() in /home/centras/public_html/dle/engine/modules/functions.php on line 208



    function ShortRating ($id, $rating, $vote_num, $allow = true){
    global $config, $lang;

    what's wrong with this part?

    thanks .
    Joined: 28.05.2007 | ICQ: --


    User Group: Member
    me too, man.
    so i cant create album, it got some sql error.

    Fatal error: Call to undefined function: safesql() in /mounted-storage/home21a/sub002/sc20906-UISW/www/engine/gallery/mod_cat.php on line 291
    Joined: 2.04.2007 | ICQ: --
    #3 ViC


    User Group: Member
    CHMOD uploads/gallery, temp, thumb, main folders 777.
    show_galcat.tpl CHMOD 777.

    It seems I cannot find show_galcat.tpl in distr. package.
    Any clues?
    Thanks
    smile
    Joined: 3.09.2006 | ICQ: --
    #2 Tak


    User Group: Editor
    iranthavan,

    winked lol

    u might have more luck then i did though working it all out...still a little buggy/untranslated


    --------------------
    On Holidays for over a year ;) Joined: 3.06.2006 | ICQ: --


    User Group: Member
    damn after long long struglle i did the gallery myself and now u posting the trans.. i hate u man
    Joined: 19.03.2007 | ICQ: --

    Information

    Members of Guest cannot leave comments.


    Your Ad Here

    Vote

    Datalife Engine is
    Excellent
    Good
    Fair
    Poor
    Bad

    Get Chitika eMiniMalls

    The information

    Online Now:
    Users: 0
    Not Online.

    Robots: 2
    GooglebotWebAlta Crawler

    Guests: 10
    Total: 12

    Last Online Users:
    Users: 20
    abdouaniba admin7
    alnoah bethuy
    bitto dato_var4
    funning17 g-mic
    javad kyoko
    MaCeLMp4 Magid
    Motor name_less
    pakio sanalreis
    sma_eslami topsoftware
    whosthis.ee zigmuntt

    Tgs Cloud

    4support, Added, After, Appointmentmodule, BBcode, CHMOD, Cache, Clear, Cropping, Datalifeengine, Description, Dle, EMail, ENGINE_DIRincparseclassphp, Length, Uberat, access, according, adding, additional, administrator, attention, categories, certain, changes, closing, comments, corrected, creation, directly, domain SUPPORT, editing, enginecachesystemStart, errors, everything, files, folder, forum, friends, indispensable, install, installation, installphp, issue, itsinstructions, language, large, listof, moved, myFAQ, notice, opening, opublikovanye, patterns, player, possible, published, question, received, record, referring, registration, removal, responses, roach, script, server, submit, support, system, titla, upgrade, useful, users, using, version, versions, visitors, which, worry

    To show all tags