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)

cillianok 02-19-2008 10:34 AM

Quote:

Originally Posted by AndrewD (Post 1445870)
The file local_links_init.php is contained in the includes/ subdirectory of the release zipfile and uploaded into the forums/includes/ subdirectory.

Open the file using a text editor and find these lines:

Code:

if ($_SERVER["DOCUMENT_ROOT"]) {
        define('LDM_DOCUMENT_ROOT', $_SERVER["DOCUMENT_ROOT"]);
}
else {
// If you are running the IIS web server in CGI mode on Windows or if otherwise warned, uncomment and edit this line
//        define('LDM_DOCUMENT_ROOT', '/path/to/your/site');
}

You need to replace the line
Code:

//        define('LDM_DOCUMENT_ROOT', '/path/to/your/site');
by the correct directory path to your web site, e.g.:

Code:

        define('LDM_DOCUMENT_ROOT', '/data/www-root/mysite');

You can generally figure out what is your '/data/www-root/mysite' by going to your vbulletin/admincp/maintenance/php info page, and taking a look at the listing. I can't easily tell you what line to look for, as I do not have a windows-based IIS server available.

If you have problems with this, send me a PM with site details and a username/password for an account with admin privs on your board, and I'll take a look myself.


as in, it lists this there:

PATH_TRANSLATED:
D:\hshome\liamdunne1\jacksiesbnb.com\forums\adminc p\index.php


so...?:

D:\hshome\liamdunne1\jacksiesbnb.com\forums


I hate being a noob at things again......
:D

AndrewD 02-19-2008 10:58 AM

Quote:

Originally Posted by cillianok (Post 1446535)
as in, it lists this there:

PATH_TRANSLATED:
D:\hshome\liamdunne1\jacksiesbnb.com\forums\adminc p\index.php


so...?:

D:\hshome\liamdunne1\jacksiesbnb.com\forums


I hate being a noob at things again......
:D

D:\hshome\liamdunne1\jacksiesbnb.com should do it

cillianok 02-19-2008 11:15 AM

good to go, thanks Andrew

dodjer42 02-19-2008 08:31 PM

Yes tried with IE as well. Same result.

Very bizarre.

local_links_admin.php?set=settings <--- acess works fine

But when I hit update in IE or Opera

local_links_admin.php <--- page not found

::erm:

AndrewD 02-20-2008 02:41 AM

Quote:

Originally Posted by dodjer42 (Post 1446870)
Yes tried with IE as well. Same result.

Very bizarre.

local_links_admin.php?set=settings <--- acess works fine

But when I hit update in IE or Opera

local_links_admin.php <--- page not found

::erm:

Would you like me to take a look at your site? If so, I will need *full* access to your vb admincp. Send me a PM if so.

totoy4 02-20-2008 01:48 PM

Hello everybody,

I've installed this great hack but I have a problem with downloading files.
I have set local_file_root to yes and local_file_root_prefix to a folder outside the location of my website Let's say for example: /home/mysite/mysite_upload
I have set recursively chmod 777 to this folder.
Then I have set upload_dir=/uploadsdir
So in theory, when I upload a file, for example story.doc in the site, I should have a new file on the server here (I have set force_redirect=1):

/home/mysite/mysite_upload/uploadsdir/1/871312035211987207.doc

And it's basically what happens. Everything is working fine for the upload. But when I try to download this file from the site, I get this error:


Not Found
The requested URL /uploadsdir/1/871312035211987207.doc was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


I have read this thread, I can't find the explanation for this problem. I have checked that seo_friendly is set to no. I have checked the read rights on uploadsdir, everything is looking fine.
Does someone have an idea on this ?
Cheers.

AndrewD 02-20-2008 04:24 PM

Quote:

Originally Posted by totoy4 (Post 1447343)
Hello everybody,

I've installed this great hack but I have a problem with downloading files.
I have set local_file_root to yes and local_file_root_prefix to a folder outside the location of my website Let's say for example: /home/mysite/mysite_upload
I have set recursively chmod 777 to this folder.
Then I have set upload_dir=/uploadsdir
So in theory, when I upload a file, for example story.doc in the site, I should have a new file on the server here (I have set force_redirect=1):

/home/mysite/mysite_upload/uploadsdir/1/871312035211987207.doc

And it's basically what happens. Everything is working fine for the upload. But when I try to download this file from the site, I get this error:


Not Found
The requested URL /uploadsdir/1/871312035211987207.doc was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


I have read this thread, I can't find the explanation for this problem. I have checked that seo_friendly is set to no. I have checked the read rights on uploadsdir, everything is looking fine.
Does someone have an idea on this ?
Cheers.

The problem is (I think) that you have set force_redirect to 1, which is telling LDM to do a browser redirect to access the file. However, because you are storing the files *outside* the web server directory tree, this is impossible. You either need to set force_redirect to 0 or store the files within the web server tree by having local_file_root set to 'no'.

totoy4 02-21-2008 07:57 AM

Thank you very much Andrew. That would explain. I'll try your second solution.

mri_mohammad 02-22-2008 04:14 PM

Quote:

Originally Posted by mri_mohammad (Post 1440836)
hi this is great hack but some body do something like that
see screenshot attached
how i can do something like that?

thanks for answer lol

AndrewD 02-22-2008 04:25 PM

Quote:

Originally Posted by mri_mohammad (Post 1448770)
thanks for answer lol

I did see your post, but it was not clear to me what you were asking. Are you wanting someone to design your website?

mri_mohammad 02-22-2008 05:28 PM

no i don't want to someone design my website but i want to know how they do that?

and i have problem
you can see it at below picture

obmob 02-22-2008 05:53 PM

Quote:

Originally Posted by mri_mohammad (Post 1440836)
hi this is great hack but some body do something like that
see screenshot attached
how i can do something like that?

Quote:

Originally Posted by mri_mohammad (Post 1448770)
thanks for answer lol

Well, you need to edit those linkbit templates, depending on the ones you have set on your configuration.

The first pic looks interesting :p

AndrewD 02-22-2008 06:39 PM

Quote:

Originally Posted by mri_mohammad (Post 1448819)
no i don't want to someone design my website but i want to know how they do that?

and i have problem
you can see it at below picture

OK, it's about the extra urls associated with entries. I imagine that this is something that they have added themselves. But the new release of LDM, version 2.2.9, adds this facility as a standard feature. Possibly, you will staill have to do some template modifactions.

mri_mohammad 02-22-2008 10:18 PM

ok thank you i will waiting for it but how about my problem can you help me?

AndrewD 02-23-2008 01:58 AM

Quote:

Originally Posted by mri_mohammad (Post 1449012)
how about my problem can you help me?

Sorry, I missed that - was too quick with the reply.

Your attachment shows that broken thumbnail images associated with these entries. There are a number of possible reasons and I can't say which is correct without taking a look at your site. If you would like me to do this, send me a PM with site details and a username which has full access to the vbulletin admincp.

RikiB 02-23-2008 05:04 AM

I noticed the byte limit but is there a way to limit how many times each file is downloaded? I just want users to be able to download certain files a maximum of 3 times. There are many files at different sizes so limited based off bytes is not the best option for me.

Thanks!!

AndrewD 02-23-2008 05:16 AM

Quote:

Originally Posted by RikiB (Post 1449167)
I noticed the byte limit but is there a way to limit how many times each file is downloaded? I just want users to be able to download certain files a maximum of 3 times. There are many files at different sizes so limited based off bytes is not the best option for me.

Thanks!!

This is easy to add as a plugin, althought it is not currently available. I will write it for you if you want. Let me know.

Only point to consider - users' hits are stored in the 'hits' table. Popular sites can attract many hits, so this table can become quite large. Consequently, LDM will normally 'prune' the table to get rid of old hits. It is not possible to keep track of individual hits that are older than the 'prune' period, so if you really want to limit your users to 3 hits per file *forever* then you have to keep the hits table populated forever.

RikiB 02-23-2008 05:21 AM

Ahh I see your point.
My situation is I give a particular user 5 days to download particular files after they paid using the built in payment subscription. During that 5 days I would just like them to be able to download each file 3 times or so. After the 5 days the data can be pruned no problem.
If you could write this I would be very greatful, and thank you for such an amazing plugin and support! :)

AndrewD 02-24-2008 02:39 AM

Quote:

Originally Posted by RikiB (Post 1449174)
Ahh I see your point.
My situation is I give a particular user 5 days to download particular files after they paid using the built in payment subscription. During that 5 days I would just like them to be able to download each file 3 times or so. After the 5 days the data can be pruned no problem.
If you could write this I would be very greatful, and thank you for such an amazing plugin and support! :)

I realise that I am losing my mind. I have already written this facility for someone else and it is available as a vb plugin in the 'extras' directory -> release/extras/limit-useraccess/limitaccess-byhits-plugin.xml. Just install via the vb admincp/plugins page.

Once installed, you get another group of options on the ldm admin/settings and edit category/control pages. You can apply the limits to one or several usergroups, and you can apply different controls in different ldm categories.

Let me know if this serves your requirement.

RikiB 02-24-2008 03:23 AM

nice! Looks like it will work perfectly, Thanks!

RikiB 02-24-2008 04:10 AM

I am currently trying to use the JW flv player. Here are a few problems I am having, maybe someone can give me some tips:

1. Why are the settings not changeable through the admin control? I have to edit the .xml plugin to change the size and other settings?
2. The player seems to play mp3 files fine outside the webroot but is having troubles with flv files? ( i installed the mime plugin but it didnt help, I also edited to plugin to "stream")
3. Is there a way to point to a playlist xml instead of a single flv file?
4. Can I customize the jukebox page to only play the player and no jukebox icons or anything?

Thanks!

RikiB 02-24-2008 04:27 AM

also:

5. When I enter the video player it resizes the browser window, can this be disabled.
6. Ive read the earlier posts about having the player play inside the links view instead of opening in another window, having this open in lightbox, or greybox, or even right there would be a great addition.

Thanks again.

AndrewD 02-24-2008 04:41 AM

Quote:

Originally Posted by RikiB (Post 1449679)
I am currently trying to use the JW flv player. Here are a few problems I am having, maybe someone can give me some tips:

1. Why are the settings not changeable through the admin control? I have to edit the .xml plugin to change the size and other settings?
2. The player seems to play mp3 files fine outside the webroot but is having troubles with flv files? ( i installed the mime plugin but it didnt help, I also edited to plugin to "stream")
3. Is there a way to point to a playlist xml instead of a single flv file?
4. Can I customize the jukebox page to only play the player and no jukebox icons or anything?

Thanks!

Point 1 - fixed in 2.2.9.

Point 2 - fixed in 2.2.9 (I hope) - I think I'd made a mistake with urlencoding

Point 3 - not currently - I think this may get done for the final release of 2.2.9

Point 4 - edit the links_playbit template

AndrewD 02-24-2008 04:45 AM

Quote:

Originally Posted by RikiB (Post 1449682)
also:

5. When I enter the video player it resizes the browser window, can this be disabled.
6. Ive read the earlier posts about having the player play inside the links view instead of opening in another window, having this open in lightbox, or greybox, or even right there would be a great addition.

Thanks again.

5 - edit the links_play_standalone template and kill the Javascript self.resizeTo

6 - I agree. there is an addon in the 2.2.9 extras directory (inline-JW-player) which puts the player in the linkbit. It would be much cooler to put videos in the lightbox, and I'll see if I can work out how.

RikiB 02-24-2008 04:51 AM

Thank you very much!, let me know if you need a 2.29 beta tester :).

Ophelia 02-24-2008 10:06 PM

We ran into an issue tonight. I have checked the permissions, and this gal should be able to upload, however, we get the following error

Quote:

Username Rachel's Stuff not recognised
Her username is Rachel's Stuff (just like that).

She's in the correct usergroup, she has permissions, but it's deny her the right to upload. Any ideas (I am thinking it's because of her username).

Ophelia 02-24-2008 11:18 PM

One more thing.

We now require them to comment before they can download, the problem with this is that once the first person makes a comment the (Rate/Comment) link changes to [1 comments/ratings]. There is no obvious visual indicator on how to comment. A button that would bring up the comment box, without forcing them to view the other comments would be wonderful, or even just a button that does.. just a button all together ;)

Christian96 02-25-2008 12:42 PM

Hi AndrewD !

Congratulations for your LDM, works great !

I have two questions:
- How can i add the LDM seach to the navigation bar of the vBulletin main page ?
- I also want that new posts in the LDM are shown up in the New Posts of the vBulletin main page ?

Many thanks,
Christian

AndrewD 02-25-2008 04:51 PM

Quote:

Originally Posted by Ophelia (Post 1450296)
We ran into an issue tonight. I have checked the permissions, and this gal should be able to upload, however, we get the following error



Her username is Rachel's Stuff (just like that).

She's in the correct usergroup, she has permissions, but it's deny her the right to upload. Any ideas (I am thinking it's because of her username).

Yes, this is a username problem.

I can't recall which version of LDM you are running - if it is 2.2.8, you can fix the problem (I hope) as follows:

edit includes/local_links_include.php
find function lookup_userids (around line 1843)

replace the following sequence of lines:

Code:

        $ids = array();
        foreach ($usernames as $k=>$v) {
                $usernames[$k] = trim($vbulletin->db->escape_string(htmlspecialchars_uni($v)));
                $ids[$k] = 0;
        }
        $userlist = implode("' ,'", $usernames);
        if (!trim($userlist)) return $ids;

        $query = "
                SELECT userid, username
                FROM " . TABLE_PREFIX . "user AS user
                WHERE username IN ('" . $userlist . "')
                ";
        $asb = $vbulletin->db->query_read($query);

        while ($rec=$vbulletin->db->fetch_array($asb)) {
                foreach ($usernames as $k=>$v) {
                        if ($v==$rec['username']) {
                                $ids[$k] = $rec['userid'];
                                continue;
                        }
                }
        }
        $vbulletin->db->free_result($asb);

        return $ids;

by

Code:

        $ids = array();
        $safe_usernames = array();
        foreach ($usernames as $k=>$v) {
                $safe_usernames[$k] = trim($vbulletin->db->escape_string(htmlspecialchars_uni($v)));
                $ids[$k] = 0;
        }
        $safe_userlist = implode("' ,'", $safe_usernames);
        if (!trim($safe_userlist)) return $ids;

        $query = "
                SELECT userid, username
                FROM " . TABLE_PREFIX . "user AS user
                WHERE username IN ('" . $safe_userlist . "')
                ";
        $asb = $vbulletin->db->query_read($query);

        while ($rec=$vbulletin->db->fetch_array($asb)) {
                foreach ($usernames as $k=>$v) {
                        if ($v==$rec['username']) {
                                $ids[$k] = $rec['userid'];
                                continue;
                        }
                }
        }
        $vbulletin->db->free_result($asb);

        return $ids;

Basically, replace most of the references to usernames with safe_usernames.

This will be fixed in the next version of 2.2.9.

AndrewD 02-25-2008 04:54 PM

Quote:

Originally Posted by Ophelia (Post 1450335)
One more thing.

We now require them to comment before they can download, the problem with this is that once the first person makes a comment the (Rate/Comment) link changes to [1 comments/ratings]. There is no obvious visual indicator on how to comment. A button that would bring up the comment box, without forcing them to view the other comments would be wonderful, or even just a button that does.. just a button all together ;)

Noted.

AndrewD 02-25-2008 05:12 PM

Quote:

Originally Posted by Christian96 (Post 1450626)
I have two questions:
- How can i add the LDM seach to the navigation bar of the vBulletin main page ?

see https://vborg.vbsupport.ru/showpost.php?p=1429822

Quote:

Originally Posted by Christian96 (Post 1450626)
- I also want that new posts in the LDM are shown up in the New Posts of the vBulletin main page ?

see the extras directory in the release zip - patch-forumhome-newlinks should do the job

Ophelia 02-26-2008 12:25 AM

That fixed it Andrew (the Rachel's Stuff). Thank you!

Ophelia 02-26-2008 02:58 PM

Andrew,

Is there a quick and easy way to just turn off the ability to Rate?

We have one download area on our site that they have to comment before they download. We don't care about the rating (and it's actually causing more headache then good), so I would like to just be able to remove the ability to rate all together and just have the ability to comment. I noticed that the only way you can comment is to rate first (the submit button is grayed out until then).

indie2industry 02-27-2008 08:00 PM

Is there a way to vocaltag the audio? I have a music forum with producers & engineers and it'll just be too easy to just record the audio from the media player.

AndrewD 02-28-2008 03:48 AM

Quote:

Originally Posted by indie2industry (Post 1452436)
Is there a way to vocaltag the audio? I have a music forum with producers & engineers and it'll just be too easy to just record the audio from the media player.

I've no idea - can you point at somewhere which explains vocaltags? A google search took me to an Israeli company that works on animal health.

Christian96 02-28-2008 05:59 AM

Quote:

Originally Posted by AndrewD (Post 1450823)

Hi AndrewD !

Many thanks for your help !

The search patch:
We have 2 forums, one test forum (v3.6.8 Patch Level 2) and our 'real' forum (v3.6.5). The search patch only work on the test forum, not on the real one. Do we have to update our version of the real forum ? Is there an other reason, why this wouldn't work ? How can I narrow down that ?

Thanks again,
Christian

AndrewD 02-28-2008 06:41 AM

Quote:

Originally Posted by Christian96 (Post 1452687)
Hi AndrewD !

Many thanks for your help !

The search patch:
We have 2 forums, one test forum (v3.6.8 Patch Level 2) and our 'real' forum (v3.6.5). The search patch only work on the test forum, not on the real one. Do we have to update our version of the real forum ? Is there an other reason, why this wouldn't work ? How can I narrow down that ?

Thanks again,
Christian

I only wrote this patch recently. It uses the global_setup_complete hook in vbulletin and works the same way as the plugin that the vbulletin people use themselves for their blog software. I've no idea whether that hook was already available in vbulletin 3.6.5, or if the functions in that version of vbulletin are compatible.

RikiB 03-02-2008 06:29 AM

Is there a way to hide categories based off usergroup (without creating a special forum).
This plugin blocks based off usergroup: blockaccess-byusergroup-plugin.xml
Would it be hard to make a similar plugin: hideaccess-byusergroup-plugin.xml
I may end up with many categories all set with special usergroup permissions, and hiding the categories would eliminate confusion.
Many thanks!
Riki

AndrewD 03-02-2008 06:37 AM

Quote:

Originally Posted by RikiB (Post 1454975)
Is there a way to hide categories based off usergroup (without creating a special forum).
This plugin blocks based off usergroup: blockaccess-byusergroup-plugin.xml
Would it be hard to make a similar plugin: hideaccess-byusergroup-plugin.xml
I may end up with many categories all set with special usergroup permissions, and hiding the categories would eliminate confusion.
Many thanks!
Riki

I wish that I had not used forum-based permissions inside LDM when I started with this hack (now 4 years ago!). I've gradually been adding LDM-based permissions, while trying to keep everything clean and consistent.

The LDM permission *can_view_category* is added in version 2.2.9, and will allow you to make individual categories/category trees visible or invisible to selected usergroups without having to use forum-based permissions.

In 2.2.8, you still have to use forum-based permissions.

RikiB 03-03-2008 12:39 AM

wow, 4 years! That must be why it is so powerful, this is by far my favorite hack! Is 2.2.9 download-able anywhere, or is it still wip? I assume it is still wip, I will remain patient :)

Thanks again!


All times are GMT. The time now is 04:10 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.04829 seconds
  • Memory Usage 1,872KB
  • 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
  • (5)bbcode_code_printable
  • (23)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