vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - Links and Downloads Manager (https://vborg.vbsupport.ru/showthread.php?t=119041)

Hades-1 10-01-2006 11:59 PM

is there anyway i could make it should the number of comments on each download?

next to where it says rate/comment id like to display the number?

Hades-1 10-02-2006 12:09 AM

also im trying to install autocreate-threads

but the instructions inside the zip arnt very clear and the wiki doesnt provide install instructions for that, could u help me out?

petersweb 10-02-2006 12:12 AM

Thanks for a wonderful product! I've installed it on my site and have it up and running already.

Now all I've got to do is upload content :)

Many thanks!

jgommel 10-02-2006 01:45 AM

* Sorry for the duplicate post (I posted the same question on the 3.5 version of this app accidentally *

I recently installed LDM and really love this app, but I'd like to utilize my own icons instead of the stock ones. My site is dark - It utilizes multiple shades of grey.

I'm currently developing a bunch of 16x16 icons for my website, but I'm using .png instead of .gif. I decided to use PNGs because they render shadows much better than GIFs. I can create an icon with a drop shadow and use the same icon on both a white or a dark colored website.

Can someone tell me whether it's possible to utilize a .png icon with LDM? If I only need to edit a template or two (or more) that's fine - I just need to know which ones.

Thanks!

AndrewD 10-02-2006 04:40 AM

Quote:

Originally Posted by jgommel
* Sorry for the duplicate post (I posted the same question on the 3.5 version of this app accidentally *

I recently installed LDM and really love this app, but I'd like to utilize my own icons instead of the stock ones. My site is dark - It utilizes multiple shades of grey.

I'm currently developing a bunch of 16x16 icons for my website, but I'm using .png instead of .gif. I decided to use PNGs because they render shadows much better than GIFs. I can create an icon with a drop shadow and use the same icon on both a white or a dark colored website.

Can someone tell me whether it's possible to utilize a .png icon with LDM? If I only need to edit a template or two (or more) that's fine - I just need to know which ones.

Thanks!

Currently, LDM is 'hard coded' to use gifs. However, it's a minor change to the current version, and I'll make this standard from the next release.

Edit includes/local_links_include.php

Find function get_icons()

Six lines later, edit the line

Code:

if (preg_match("/(.*?).gif/", $file, $matches)) {
to read

Code:

if (preg_match("/(.*?).(gif|jpg|png)/", $file, $matches)) {
Find the line

Code:

$linkfavicon = mk_file_name($links_defaults['file_icons_dir'],'myfav.gif');
and change myfav.gif

Find the line

Code:

$linkediticon = mk_file_name($links_defaults['file_icons_dir'],'pencil.gif');
and change pencil.gif

That should do it, I think.

AndrewD 10-02-2006 05:20 AM

Quote:

Originally Posted by Hades-1
is there anyway i could make it should the number of comments on each download?

next to where it says rate/comment id like to display the number?

When at least one person has made a comment, the rate/comment message changes to indicate this - see attached image. Is this what you want?

AndrewD 10-02-2006 05:34 AM

Quote:

Originally Posted by Hades-1
also im trying to install autocreate-threads

but the instructions inside the zip arnt very clear and the wiki doesnt provide install instructions for that, could u help me out?

Step 1: Installing the plugin

-> VB/admincp/plugins and products
Download/Upload plugins
Import either autocreate-plugin.xml or autocreate-2way-plugin.xml

The first plugin creates new threads with a message with a link to the new LDM entry. The second plugin does the same, but also modifies the LDM entry description to include a link to the thread.

Once installed, the plugin is active.

Step 2: Using the plugin

The plugin runs automatically whenever a new entry is created in LDM *provided* that entry is "associated" with a forum. Entries are either "associated" with a forum by default (if the admin has set the LDM setting default_forumid), implicitly by picking it up from the category's associated forum (Add/Edit category) or explicitly in the Add Entry form, by users who have the LDM permission *can_set_permissions*.

Forum associations are normally used in LDM to set up access permissions, but this association is picked up by the plugin to decide where to post the new thread.

If an entry is created without an associated forum, the plugin does nothing.


Step 3: Modifying the plugin (Advanced Use!!)

If you want the plugin only to fire in certain LDM categories, you can edit it. There are two lines in each plugin with the php code $limitcats = array(); You need to change the array statement to include a list of the category numbers where the plugin will fire. You can find the category numbers by looking for the "catid" that is shown when you hover the mouse over a link to the category.

Normally, you will not need to worry about this - just install the plugin and let it run.

rasun 10-02-2006 08:27 AM

Thank you for this great add-on,

Are there any informations when 2.2.6 Final will be released?

I only need the Link Manager of it...is it possible to disable all other funktions (Jukebox, Download Manager)? I also don´t want users to upload or download anything to/from my server. They should only be able to post links and some text there...is this possible?
Couldn´t find any AdminCP Options screenshots...how do you administer all this settings....?

Slave 10-02-2006 09:08 AM

Hi Andrew :)

Just installed the beta .. I don't seem to get to the 2nd and 3rd page of settings when editing a category again .. have you changed the code that I need to have in the header template? (I'm using the vBa wraparound thing, remember :))

Hades-1 10-02-2006 02:52 PM

Quote:

Originally Posted by AndrewD
When at least one person has made a comment, the rate/comment message changes to indicate this - see attached image. Is this what you want?


opps yes sorry, so i guess im all set.

Hades-1 10-02-2006 02:54 PM

Quote:

Originally Posted by AndrewD
Step 1: Installing the plugin

-> VB/admincp/plugins and products
Download/Upload plugins
Import either autocreate-plugin.xml or autocreate-2way-plugin.xml

The first plugin creates new threads with a message with a link to the new LDM entry. The second plugin does the same, but also modifies the LDM entry description to include a link to the thread.

Once installed, the plugin is active.

Main problem, when installing the plugin it ask me abouta hook? which hook do i choose? im not familiar with pluging, i usually use products which this is not.

Installing the plugin itself through the admincp is my main problem.

AndrewD 10-02-2006 03:07 PM

Quote:

Originally Posted by Hades-1
Main problem, when installing the plugin it ask me abouta hook? which hook do i choose? im not familiar with pluging, i usually use products which this is not.

Installing the plugin itself through the admincp is my main problem.

You use the download/upload part of the plugins admincp. There's a box at the bottom of the page (see attached) where you are prompted for the file. Just browse to the xml file and upload it - VB will work out the rest.

AndrewD 10-02-2006 03:50 PM

Quote:

Originally Posted by rasun
Thank you for this great add-on,

Are there any informations when 2.2.6 Final will be released?

I only need the Link Manager of it...is it possible to disable all other funktions (Jukebox, Download Manager)? I also don?t want users to upload or download anything to/from my server. They should only be able to post links and some text there...is this possible?
Couldn?t find any AdminCP Options screenshots...how do you administer all this settings....?

2.2.6 is nearly ready to go. There has been only one main bug with the beta, which only three people have reported - I posted a fix for this a few days ago, which one person has already reported works, so I expect to finalise this release very soon. 2.2.5 is also a stable release, with one bug in part of the admin page which many users never use.

When you first install LDM, uploads are disabled, and only the administrator can provide items for general use. You use the LDM/admin/permissions page to control which usergroups can do things. Basically, you have to turn things like the Jukebox and uploads on, rather than turn them off.

If you need help getting things going, please feel free to ask.

AndrewD 10-02-2006 03:53 PM

Quote:

Originally Posted by Slave
Hi Andrew :)

Just installed the beta .. I don't seem to get to the 2nd and 3rd page of settings when editing a category again .. have you changed the code that I need to have in the header template? (I'm using the vBa wraparound thing, remember :))

Yes, partly to make things easier for you :):), I moved the LDM Javascript into a file.

So you need the following statement in your wraparound:

Code:

<script type="text/javascript" src="clientscript/ldm_global.js"></script>

Hades-1 10-02-2006 04:09 PM

Quote:

Originally Posted by AndrewD
You use the download/upload part of the plugins admincp. There's a box at the bottom of the page (see attached) where you are prompted for the file. Just browse to the xml file and upload it - VB will work out the rest.

ok great, now 2 last things i swear
  1. how can i remove the comment system for LDM, well disable it.
  2. is there away to create threads for uploads already posted?

AndrewD 10-02-2006 04:12 PM

Quote:

Originally Posted by Hades-1
how can i remove the comment system for LDM, well disable it.

Take away can_rate_link permission from all usergroups in LDM/admin/permissions

Quote:

Originally Posted by Hades-1
is there away to create threads for uploads already posted?

Not easily

Hades-1 10-02-2006 04:19 PM

ok i lied another last thing, i already ahd the categories laid out, so i went to settings and choose the forum id i wanted over all.

then i went to each cat and tried to pick a specific sub forum for the threads, but im not able to, why?

AndrewD 10-02-2006 04:43 PM

Quote:

Originally Posted by Hades-1
ok i lied another last thing, i already ahd the categories laid out, so i went to settings and choose the forum id i wanted over all.

then i went to each cat and tried to pick a specific sub forum for the threads, but im not able to, why?

Are you looking in the right place on the category edit form?

Forum association for categories is on the first tab.

Hades-1 10-02-2006 04:50 PM

Quote:

Originally Posted by AndrewD
Are you looking in the right place on the category edit form?

Forum association for categories is on the first tab.

my turn to post a screenshot :)

AndrewD 10-02-2006 04:57 PM

Quote:

Originally Posted by Hades-1
my turn to post a screenshot :)

Have you given yourself *can_set_permissions* permission on the LDM/admin/permissions?

Hades-1 10-02-2006 05:09 PM

Quote:

Originally Posted by AndrewD
Have you given yourself *can_set_permissions* permission on the LDM/admin/permissions?

ok thanks i got it now

you said i cant make threads for existing uploads already easily.........well whats the hard way then?

obmob 10-02-2006 05:09 PM

Oh, can't wait for final 2.2.6 :D

Well, i can.. and i will :)

Slave 10-02-2006 05:17 PM

Quote:

Originally Posted by AndrewD
Yes, partly to make things easier for you :):), I moved the LDM Javascript into a file.

So you need the following statement in your wraparound:

Code:

<script type="text/javascript" src="clientscript/ldm_global.js"></script>

That's great .. thanks :) :) .. works like a charm :D

AndrewD 10-02-2006 05:23 PM

Quote:

Originally Posted by Hades-1
ok thanks i got it now

you said i cant make threads for existing uploads already easily.........well whats the hard way then?

You really want to know??

Use something like phpmyadmin, browse to the local_linkslink table, and change all the linkmoderate fields to -2.

Go into LDM, select moderate, and then accept the entries.

Hades-1 10-02-2006 05:48 PM

Quote:

Originally Posted by AndrewD
You really want to know??

Use something like phpmyadmin, browse to the local_linkslink table, and change all the linkmoderate fields to -2.

Go into LDM, select moderate, and then accept the entries.

thats quite easy actually, thanks.

i was also thinking that this page looks plain

http://mmamedia.net//local_links.php

is there anyway i can put the most recent comments/rating people made next tot he stats?

ericgtr 10-02-2006 11:47 PM

Quote:

Originally Posted by AndrewD
Step 1: Installing the plugin

-> VB/admincp/plugins and products
Download/Upload plugins
Import either autocreate-plugin.xml or autocreate-2way-plugin.xml

The first plugin creates new threads with a message with a link to the new LDM entry. The second plugin does the same, but also modifies the LDM entry description to include a link to the thread.

Once installed, the plugin is active.

Step 2: Using the plugin

The plugin runs automatically whenever a new entry is created in LDM *provided* that entry is "associated" with a forum. Entries are either "associated" with a forum by default (if the admin has set the LDM setting default_forumid), implicitly by picking it up from the category's associated forum (Add/Edit category) or explicitly in the Add Entry form, by users who have the LDM permission *can_set_permissions*.

Forum associations are normally used in LDM to set up access permissions, but this association is picked up by the plugin to decide where to post the new thread.

If an entry is created without an associated forum, the plugin does nothing.


Step 3: Modifying the plugin (Advanced Use!!)

If you want the plugin only to fire in certain LDM categories, you can edit it. There are two lines in each plugin with the php code $limitcats = array(); You need to change the array statement to include a list of the category numbers where the plugin will fire. You can find the category numbers by looking for the "catid" that is shown when you hover the mouse over a link to the category.

Normally, you will not need to worry about this - just install the plugin and let it run.

Thanks for this detailed explanation. I have tried to get this to work with the two way plugin but can't get it, I've done everything explained above. Does this work on "scanned" directories?

AndrewD 10-03-2006 04:03 AM

Quote:

Originally Posted by ericgtr
Thanks for this detailed explanation. I have tried to get this to work with the two way plugin but can't get it, I've done everything explained above. Does this work on "scanned" directories?

It won't work when you do LDM/admincp/categories/scan, as that route through the code does not trigger the plugins.

The plugins fires in these two cases:

a) Normal "Add Entry" when moderation is off
b) Moderate "Accept Entry" when moderation is on

They only fire if the entry has been given an associated forum (explicitly or implicitly) which is open for posting.

ericgtr 10-03-2006 01:01 PM

Quote:

Originally Posted by AndrewD
It won't work when you do LDM/admincp/categories/scan, as that route through the code does not trigger the plugins.

The plugins fires in these two cases:

a) Normal "Add Entry" when moderation is off
b) Moderate "Accept Entry" when moderation is on

They only fire if the entry has been given an associated forum (explicitly or implicitly) which is open for posting.

Okay, that's what I figured. I have around 250 files that I scanned in, is there a query that I can run to associate these to make my life easier? :)

AndrewD 10-03-2006 03:54 PM

Quote:

Originally Posted by ericgtr
Okay, that's what I figured. I have around 250 files that I scanned in, is there a query that I can run to associate these to make my life easier? :)

Do I understand you right? You want to create 250 threads, each one pointing to one of your entries in LDM?

Funny thing is, I answered this same question two days ago - take a look at post 424 just above.

|oR|Greg 10-03-2006 04:24 PM

Made a new _greg template, and altered the _main to fit the various template column headings based on $catid. :D I'm quite proud.

For example, here you'll see that the headings are Download/File Information/Date/Downloads http://www.amacny.com/vb/local_links.php?catid=7

Whereas here you'll see the headings are Follow Link/Link Information/Date/Hits http://www.amacny.com/vb/local_links.php?catid=5

Here is a completely custom template with no column headers http://www.amacny.com/vb/local_links.php?catid=4

Any newly added categories would get the defaul column header that just says "Entries", unless included in the _main array.

ericgtr 10-03-2006 04:27 PM

Quote:

Do I understand you right? You want to create 250 threads, each one pointing to one of your entries in LDM?

Funny thing is, I answered this same question two days ago - take a look at post 424 just above.
Yes, you understand it right. I have a lot of files that I would like new threads created out of :)

I tried that and had no luck, I tested with 30 tables, set all of the linkmoderate fields to -2, went into moderation and accepted them all and it still will not show up in the associated forum.

BTW, thanks for the excellent support I have seen throughout this thread.

obmob 10-03-2006 05:13 PM

Hmm... ok, i'm still struggling with XML a lot :(

I'd really need further explanation about columns and its format.

I want to import over 50 items at once, Andrew told me it's better to use XML for this, so i have my xml file only with the new entries, and this is how i do or don't understand them :D

linkid: well, just follow the last entry in my db
linkname: no problem
linkdoi: i don't use it, it's blank
linkdesc: no prob
linkurl: ok
linkfile: blank
linkimg: it's ok
linkimgthumb to zero
linkhits to zero
linkforum: to -999 i dont use it
linkcheck: No idea :(
linksize: this is built after link validation, right? so, can it be blank?
linkstatus: to 1? what does it mean?
linkstatusimg: also to 1?
linkdate: :( what format is this? i want to put this one after another, if i place the same date and hour, i usually sort them by number or series... so, how do you read this?
linkusername: ok
linkuserid: ok
linkmoderate: i have all to zero
linkreviewfreq: to zero
numrate: zero
totalrate: zero

Hope you can explain this to me, thanks!

ericgtr 10-03-2006 07:12 PM

I got this to work, thanks again for the help Andrew. Maybe this would be good for a future request :) It's a bummer to have to manually sit and approve each link one at a time, with many links that takes quite a while.

Der Sauger1 10-03-2006 08:20 PM

Very nice Hack,but have questions!!

What must i do too addet ED2K links or AJ Links and others Link vormates ??:confused:

Thanks for the work :D :D :D :D :D

AndrewD 10-04-2006 05:09 AM

Quote:

Originally Posted by ericgtr
I got this to work, thanks again for the help Andrew. Maybe this would be good for a future request :) It's a bummer to have to manually sit and approve each link one at a time, with many links that takes quite a while.

Yes, I agree. The alpha code for 2.2.7 has 'select all' options for moderation.

AndrewD 10-04-2006 05:14 AM

Quote:

Originally Posted by Der Sauger1
Very nice Hack,but have questions!!

What must i do too addet ED2K links or AJ Links and others Link vormates ??:confused:

Thanks for the work :D :D :D :D :D


LDM is currently hard coded to accept certain protocols. From what I see, ed2k protocol is straightforward to handle. If you are comfortable playing around with the code, take a look in includes/local_links_include.php Find the block

Code:

// Protocols supported
define('MODE_HIDE', 0);
define('MODE_REDIRECT', 1);
define('MODE_OPEN', 2);
$protocol_schemes = array(
        "http"=> array("mode"=>MODE_HIDE, "validate"=>1, "musicbox"=>1),
        "https"=> array("mode"=>MODE_HIDE, "validate"=>1, "musicbox"=>1),
        "ftp"=> array("mode"=>MODE_HIDE, "validate"=>1, "musicbox"=>1),
        "irc"=> array("mode"=>MODE_OPEN, "validate"=>0, "musicbox"=>0),
        "mms"=> array("mode"=>MODE_HIDE, "validate"=>0, "musicbox"=>2),
);

Maybe you just have to add a new row to the protocol_schemes array, e.g.

Code:

        "ed2k"=> array("mode"=>MODE_HIDE, "validate"=>0, "musicbox"=>0),
I have not tried this.

AndrewD 10-04-2006 05:23 AM

Quote:

Originally Posted by obmob
COLOR=red]linkcheck[/COLOR]: No idea :(
linksize: this is built after link validation, right? so, can it be blank?
linkstatus: to 1? what does it mean?
linkstatusimg: also to 1?
linkdate: :( what format is this? i want to put this one after another, if i place the same date and hour, i usually sort them by number or series... so, how do you read this?

linkcheck and linkdate are both dates, expressed as seconds since 1.1.1970 (there's a nice calculation for you). Easiest way to get these close to correct is just to add an entry to your database and take a look at the value.

linkstatus and linkstatusimg is one of the following:

LINK_BROKEN = 0;
LINK_OK = 1;
LINK_UPLOAD = 2;

Easiest is to set linkstatus to either 0 or 1. If you use 0, then you can subsequently use LDM/admin/statistics/validate broken to check the entries you've added. Leave linkimgstatus as 0 if you have no thumb image.

linksize is always re-built on access, so leave it at 0

I think that's all

Der Sauger1 10-04-2006 05:59 AM

Quote:

Originally Posted by AndrewD
LDM is currently hard coded to accept certain protocols. From what I see, ed2k protocol is straightforward to handle. If you are comfortable playing around with the code, take a look in includes/local_links_include.php Find the block

Code:

// Protocols supported
define('MODE_HIDE', 0);
define('MODE_REDIRECT', 1);
define('MODE_OPEN', 2);
$protocol_schemes = array(
        "http"=> array("mode"=>MODE_HIDE, "validate"=>1, "musicbox"=>1),
        "https"=> array("mode"=>MODE_HIDE, "validate"=>1, "musicbox"=>1),
        "ftp"=> array("mode"=>MODE_HIDE, "validate"=>1, "musicbox"=>1),
        "irc"=> array("mode"=>MODE_OPEN, "validate"=>0, "musicbox"=>0),
        "mms"=> array("mode"=>MODE_HIDE, "validate"=>0, "musicbox"=>2),
);

Maybe you just have to add a new row to the protocol_schemes array, e.g.

Code:

        "ed2k"=> array("mode"=>MODE_HIDE, "validate"=>0, "musicbox"=>0),
I have not tried this.


Okey it add the Link,but not Add this in Client :confused:
That search for the file on my Server???
Thx for to do this

2. i want implantet this Links and Downloads Manager - Patch forumhome to display thumbs of new links/hot linksin cmps 2.2.0 Portal,is ther any modul for to do??

obmob 10-04-2006 03:16 PM

Quote:

Originally Posted by AndrewD
linkcheck and linkdate are both dates, expressed as seconds since 1.1.1970 (there's a nice calculation for you). Easiest way to get these close to correct is just to add an entry to your database and take a look at the value.

linkstatus and linkstatusimg is one of the following:

LINK_BROKEN = 0;
LINK_OK = 1;
LINK_UPLOAD = 2;

Easiest is to set linkstatus to either 0 or 1. If you use 0, then you can subsequently use LDM/admin/statistics/validate broken to check the entries you've added. Leave linkimgstatus as 0 if you have no thumb image.

linksize is always re-built on access, so leave it at 0

I think that's all

wow, i had no idea about that... well, i guess now i can calculate them ^^

http://www.onlineconversion.com/days...n_advanced.htm
Thanks

Another question.

You know? in vb 3.6.1 when i click on LDMs config inside control panel... i'm taken out of it and config is open in the whole page... is this supposed to happen? Oo

Still using 2.2.5

ericgtr 10-04-2006 03:19 PM

Quote:

Originally Posted by AndrewD
Yes, I agree. The alpha code for 2.2.7 has 'select all' options for moderation.

Excellent, and thanks again for this mod! :)


All times are GMT. The time now is 01:35 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03416 seconds
  • Memory Usage 1,883KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (10)bbcode_code_printable
  • (29)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete