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)

Alfa1 08-15-2007 06:06 PM

Quote:

Originally Posted by Alfa1 (Post 1279562)
Quote:

Originally Posted by Alfa1
I have these forum tabs on my site. I apply conditionals to them, so that the tab that corresponds to the section of the site you are on gets highlighted.
To do this for LDM, I need to define what the cat id variables of LDM are.

I tried this, but this didn't work:
PHP Code:

<if condition="in_array($foruminfo[catid], array(126,39, 43))"><li id="active"><a href="http://www.mysite.com/forum/local_links.php?catid=126" id="active">Videos</a></li><else /><li><a href="http://www.mysite.com/forum/local_links.php?catid=126">Video</a></li></if> 

Andrew, could you please inform me of the cat id variables?


Just to clarify: I want to find the category id variables to have the right tab be highlighted when a member is in a certain category of LDM.

Quote:

Originally Posted by AndrewD (Post 1294734)
Give me a couple of days to look at this - I've not see this hack before.

Andrew, do you know the solution to this?

AndrewD 08-15-2007 06:36 PM

Quote:

Originally Posted by Alfa1 (Post 1318297)
Andrew, do you know the solution to this?

I never got this sorted out - I took a quick look at the tabs hack but didn't get beyond the introduction.

Rouzbeh1 08-15-2007 06:53 PM

updated without any problems
will do some tests and report if there were any issues
thanks Andrew

itsblack 08-15-2007 08:13 PM

I've updated without any problem. Also I have updated the chinese translation. Now this time is 100% completed. :D

Phalynx 08-15-2007 08:55 PM

Andrew, thanks for RC2! *installing*

Slave 08-15-2007 08:59 PM

RC2 downloaded .. I'll install later tonight and report any issues I find :)

Alfa1 08-15-2007 09:48 PM

Quote:

Originally Posted by AndrewD (Post 1318314)
I never got this sorted out - I took a quick look at the tabs hack but didn't get beyond the introduction.

Basically it adds tabs to the navbar. To let the right tab to highlight according to the members location, the code needs a conditional.

I think this will quickly show you how it works and what is needed:
https://vborg.vbsupport.ru/showthread.php?p=1276144

Something similar to the last option would be needed.

BTW: what do you need to have translated to Dutch? Please send it to me and I'll try to whip it up before my vacation.

Edit: I just upgraded to 2.2.8 RC2 and got this message:
Quote:

Critical error: different versions of software, templates, phrases and database.
Software: 2.2.8 database: 2.2.7
Cannot continue - ask administrator to correct.

AndrewD 08-16-2007 03:57 AM

Quote:

Originally Posted by Alfa1 (Post 1318456)
Basically it adds tabs to the navbar. To let the right tab to highlight according to the members location, the code needs a conditional.

I think this will quickly show you how it works and what is needed:
https://vborg.vbsupport.ru/showthread.php?p=1276144

Something similar to the last option would be needed.

I'll try to work this out for you.

Quote:

Originally Posted by Alfa1 (Post 1318456)
BTW: what do you need to have translated to Dutch? Please send it to me and I'll try to whip it up before my vacation.

I've attached the Dutch phrases file for LDM. It's easiest to edit the file directly, using notepad or something similar, although you can also do the job inside the VBulletin admin cp. Each line looks something like the following:

Code:

<phrase name="ldm_cp_categories" date="0" username="" version=""><![CDATA[Categorieen]]></phrase>
Its very important only to edit the part between "!CDATA[" and "]]", which contains the phrase. All of these need to be in Dutch - currently, quite a lot are the original English.

Some of the phrases include codes like "{1}" "{2}", etc. These indicate a place where something else will be filled in by LDM. You need to make sure that the word order in Dutch makes sense, so you may need to move the codes around in the phrase. However, they must be in the "right" places - so "{1}" can appear after "{2}".

Quote:

Originally Posted by Alfa1 (Post 1318456)
Edit: I just upgraded to 2.2.8 RC2 and got this message:

I imagine you uploaded the code, but did not rerun the installer. Go to VB/admincp/products and plugins and upload the 2.2.8 LDM product installer.

AndrewD 08-16-2007 04:13 AM

Quote:

Originally Posted by itsblack (Post 1318391)
I've updated without any problem. Also I have updated the chinese translation. Now this time is 100% completed. :D

Hi, and thanks for this work. There's still a few English phrases in the file you uploaded - maybe these got overlooked? I attach just the missing phrases, mainly in the WOL section.

itsblack 08-16-2007 04:30 AM

Quote:

Originally Posted by AndrewD (Post 1318637)
Hi, and thanks for this work. There's still a few English phrases in the file you uploaded - maybe these got overlooked? I attach just the missing phrases, mainly in the WOL section.

oops :p sorry for thouble, obviously I uploaded the wrong file.
PS: Some phrases such as "bytes", "url" or "Mimetypes" are don't need to translate into chinese, cause we use them as normal.

IrPr 08-16-2007 05:58 AM

Hi Andrew, im just tryin Hack/Modify LDM
and i've one question
why u seprated the catid and keywordid from _linkslink table into _linksltok and linksltoc instead of a field inside _linkslink table? whats this kind of relationship? is that standard?

im creating my own artist and track tables but donno how to make its relationship into _linkslink table
i can add fields called artistid and trackid into _linkslinks structure, and also can use ur method, creating another tables named _linksltoa and _linksltot

but which one is better? im newbie in MySQL database designin

Special thanks for this AWESOME Mod, LDM, even u dont reply this post

PS: sorry if my grammar sux:P
PS2: sorry misspelling, its 10:36 AM here and im still awake:D

AndrewD 08-16-2007 06:22 AM

Quote:

Originally Posted by IrPr (Post 1318702)
Hi Andrew, im just tryin Hack/Modify LDM
just a Q, why u seprated the catid and keywordid from _linkslink table into _linksltok and linksltoc instead if a field inside _linkslink table? whats this kind of relationship? is that standard?

im creating my own artist and track tables but donno how to make its relationship into _linkslink table
i can add fields called artistid and trackid into _linkslinks structure, and also can use ur method, creating another tables named _linksltoa and _linksltot

but which one is better? im newbie in MySQL database designin

Special thanks for this AWESOME Mode, LDM, even u dont reply this post

PS: sorry if my grammar sux:P

The basic question in designing database tables is whether the relationship between an entry and its data is 'one-to-one' or 'one-to-many'. If it's one-to-one (e.g. a category has only one name and always has one name), then you can keep the category name as a column in the same table as the categoryid. However, if it's one-to-many (an entry can be in one or several categories), you can't. Also, ideally, *everything* in a table row should be logically connected and required - a classic example is that a table of professors should not include the courses they teach, because you would lose the ability to deal with new professors and emerti or to efficiently find courses with no professor assigned. (See http://en.wikipedia.org/wiki/Database_normalization if you want the background :))

So in LDM the table structure reflects the fundamental data types - a category, an entry, a keyword, a hit, etc, and the 'XtoY' tables allow you join these together - find all the keywords associated with an entry and vice-versa, all the entries associated with a category, etc.

What you are trying to do is add a feature to LDM that people have suggested for some time (and I haven't had time to deal with), i.e. add extra data to the system. There are pros and cons to doing it in different ways:

- If you add one new column to the 'entries' table (links), then the logic is easy to implement but very inflexible. There are ways of forcing several different data items into the one columns (use the php serialize function, for example), but it becomes a mess.
- If you add a new column for each new datatype, it become a mess very quickly.
- If you handle it in a different table, then the logic is much cleaner, but it can become quite tricky to construct efficient SQL queries.

In LDM, the hairiest piece of code are the routine that build the linkbits (the individual rows which show each entry) [get_linklistbit] and the routine that works out the required SQL query [get_mainsql]. get_mainsql constructs the required 'joins' on tables to pull in the required information. Unfortunately, joins can easily get very expensive, and you can end up killing your server if you are not careful.

For your purposes, I think it would be easiest to create new tables which have this form:

1) artistid, artistname, etc

and 2) linkid, artistid

or

1) trackid, trackname, etc

and 2) linkid

Hope that helps!

IrPr 08-16-2007 06:31 AM

Quote:

Originally Posted by AndrewD (Post 1318716)
The basic question in designing database tables is whether the relationship between an entry and its data is 'one-to-one' or 'one-to-many'. If it's one-to-one (e.g. a category has only one name and always has one name), then you can keep the category name as a column in the same table as the categoryid. However, if it's one-to-many (an entry can be in one or several categories), you can't. Also, ideally, *everything* in a table row should be logically connected and required - a classic example is that a table of professors should not include the courses they teach, because you would lose the ability to deal with new professors and emerti or to efficiently find courses with no professor assigned. (See http://en.wikipedia.org/wiki/Database_normalization if you want the background :))

So in LDM the table structure reflects the fundamental data types - a category, an entry, a keyword, a hit, etc, and the 'XtoY' tables allow you join these together - find all the keywords associated with an entry and vice-versa, all the entries associated with a category, etc.

What you are trying to do is add a feature to LDM that people have suggested for some time (and I haven't had time to deal with), i.e. add extra data to the system. There are pros and cons to doing it in different ways:

- If you add one new column to the 'entries' table (links), then the logic is easy to implement but very inflexible. There are ways of forcing several different data items into the one columns (use the php serialize function, for example), but it becomes a mess.
- If you add a new column for each new datatype, it become a mess very quickly.
- If you handle it in a different table, then the logic is much cleaner, but it can become quite tricky to construct efficient SQL queries.

In LDM, the hairiest piece of code are the routine that build the linkbits (the individual rows which show each entry) [get_linklistbit] and the routine that works out the required SQL query [get_mainsql]. get_mainsql constructs the required 'joins' on tables to pull in the required information. Unfortunately, joins can easily get very expensive, and you can end up killing your server if you are not careful.

For your purposes, I think it would be easiest to create new tables which have this form:

1) artistid, artistname, etc

and 2) linkid, artistid

or

1) trackid, trackname, etc

and 2) linkid

Hope that helps!

You rock Andrew
Yeah, got ya:)
Special Thanks to you Andrew,

itsblack 08-16-2007 09:19 AM

Andrew, I have a question about vba_moudule ldm_tot.module.
It seems that the "served" option only display with a integer number. But think about that when we have number end with Gbytes, it will probably not so suitable. I hope it can display the resulat like this: "served 2.xx Gbytes". Is it thinkable?

AndrewD 08-16-2007 11:00 AM

Quote:

Originally Posted by itsblack (Post 1318796)
Andrew, I have a question about vba_moudule ldm_tot.module.
It seems that the "served" option only display with a integer number. But think about that when we have number end with Gbytes, it will probably not so suitable. I hope it can display the resulat like this: "served 2.xx Gbytes". Is it thinkable?

Quite thinkable, and even quite do-able, I'm sure. This evening...

Myra 08-16-2007 11:51 AM

I don't know if this question has already been answered and I'm sorry if it is, but can you also set permissions based on user's post count and title/ranks?

AndrewD 08-16-2007 12:23 PM

Quote:

Originally Posted by Myra (Post 1318863)
I don't know if this question has already been answered and I'm sorry if it is, but can you also set permissions based on user's post count and title/ranks?

The 'extras' directory in the release zipfile contains plugins that can block user access and/or limit their download rights according to post count, reputation and some other parameters.

Alfa1 08-16-2007 03:08 PM

Quote:

Originally Posted by AndrewD (Post 1318629)
I imagine you uploaded the code, but did not rerun the installer. Go to VB/admincp/products and plugins and upload the 2.2.8 LDM product installer.

Thanks, that did it. I edited the init file to correct my DB prefix, while I didn't upload the 2.2.8 product installer again after that.

obmob 08-16-2007 03:43 PM

Quote:

Originally Posted by AndrewD (Post 1317845)
Was busy thinking and replacing a busted graphics card.

I'll add a new plugin in the next 2.2.8 upload which does this job.

Thanks! :D

I'm always complaining. :p

Installing RC2 and testing, did i say thanks? ;)

AndrewD 08-16-2007 05:42 PM

Quote:

Originally Posted by itsblack (Post 1318796)
Andrew, I have a question about vba_moudule ldm_tot.module.
It seems that the "served" option only display with a integer number. But think about that when we have number end with Gbytes, it will probably not so suitable. I hope it can display the resulat like this: "served 2.xx Gbytes". Is it thinkable?

Replace the ldm_tot.php file in your forum/modules directory with the attached and let me know if this is ok. I've tried to make it a bit smarter.

Underlab 08-16-2007 07:09 PM

:confused:I uploaded the files. When I go to the admin and click on

links and downloads>settings>
or
links and downloads>permissions>

I get -

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 737280 bytes) in /../forums/local_links_admin.php(1693) : eval()'d code on line 386

what do I do? Where do i even begin to check out the problem?

AndrewD 08-16-2007 07:23 PM

Quote:

Originally Posted by Underlab (Post 1319125)
:confused:I uploaded the files. When I go to the admin and click on

links and downloads>settings>
or
links and downloads>permissions>

I get -

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 737280 bytes) in /../forums/local_links_admin.php(1693) : eval()'d code on line 386

what do I do? Where do i even begin to check out the problem?

Looks like your web server is allowing php to use up to 8Mbytes. Depending on how many hacks you install into VBulletin, it is easy to exceed this.

Go to vbulletin->admincp->maintenance->phpinfo. Look for the memory_limit and safe_mode settings. I imagine you'll find that memory_limit is 8M. You should ideally get your site admin to increase that to (e.g.) 12M - it's set in the server's php.ini file.

If you can't do that, and provided safe_mode is off, I can probably give you a patch that will get round the problem.

dilbert 08-16-2007 08:53 PM

I tried upgrading to php 5, and vBulletin itself was giving this type of error. I needed to move back to php4. My host is currently set at 8MB, and will be updating that soon so I can move back to php5.

itsblack 08-16-2007 11:57 PM

Quote:

Originally Posted by AndrewD (Post 1319057)
Replace the ldm_tot.php file in your forum/modules directory with the attached and let me know if this is ok. I've tried to make it a bit smarter.

Yes, it works great. :up:

itsblack 08-17-2007 09:56 AM

Hi Andrew, is that possible to let the keyword have more than 1 word? I mean, key phrases, like amazon did. For some phrases, such as "fairy tales", I don't know how to appoint the keyword with only one word.

AndrewD 08-17-2007 10:00 AM

Quote:

Originally Posted by itsblack (Post 1319462)
Hi Andrew, is that possible to let the keyword have more than 1 word? I mean, key phrases, like amazon did. For some phrases, such as "fairy tales", I don't know how to appoint the keyword with only one word.

I think that would require some careful checking through the code, to avoid unexpected consequences. Why not use something like an underscore to replace spaces?

Alfa1 08-17-2007 12:00 PM

Members often put keyphrases in anyway. This now causes a mass of unwanted keywords, as every word in the phrase is handled as a keyword. These need to be cleaned up regularly. I have about 600 keywords I need to delete per month.
I did add keywords with dashes, like 'fairy-tales', but members will enter 'fairy tales' non the less and leave 'fairy-tailes' untouched.

AndrewD 08-17-2007 12:07 PM

Quote:

Originally Posted by Alfa1 (Post 1319572)
Members often put keyphrases in anyway. This now causes a mass of unwanted keywords, as every word in the phrase is handled as a keyword. These need to be cleaned up regularly. I have about 600 keywords I need to delete per month.
I did add keywords with dashes, like 'fairy-tales', but members will enter 'fairy tales' non the less and leave 'fairy-tailes' untouched.

OK, it clearly needs a rethink. Not sure that this can be done for 2.2.8 - I keep telling myself that we've reached the end...

Alfa1 08-17-2007 11:15 PM

You've created a monster Andrew. It's so good that the end is near the end of the rainbow. I mean this. You can expand this to be an advanced photo / image gallery, a advanced multimedia player( wimpy only plays a few formats), reciprocal links manager, expand vb integration, add design options, etc. etc.

I do believe that your software is no less valuable than vbulletin itself and therefor to fully develop it to full potential, you'll need either a lot of time or a team of coders.

Tulsa 08-17-2007 11:38 PM

How has this escaped being mod of the month? It should be mod of the year!!

StarFire 08-19-2007 09:33 AM

Hi,

I encouter a problem, if I try to download a file via LDM.

Quote:

Warnung: preg_replace() [function.preg-replace]: Unknown modifier 't' in /includes/local_links_misc.php (Zeile 1354)
What does that mean and how can I get this to work?

TIA
SF

AndrewD 08-19-2007 10:17 AM

Quote:

Originally Posted by StarFire (Post 1320817)
Hi,

I encouter a problem, if I try to download a file via LDM.


What does that mean and how can I get this to work?

TIA
SF

If you are running version 2.2.7, looks as if you've enabled LDM's mod_rewrite function and there's a bug in your rewrite rules. At least, that's what line 1354 in local_links_misc is dealing with.

utw-Mephisto 08-20-2007 09:54 AM

Is there any way to upload the files on another server (different IP etc.) ?

AndrewD 08-20-2007 10:11 AM

Quote:

Originally Posted by utw-Mephisto (Post 1321479)
Is there any way to upload the files on another server (different IP etc.) ?

Not within LDM. You can use it to manage files that have been uploaded onto another server, but it won't do the uploading part.

General_ 08-21-2007 08:03 AM

Hi AndrewD,

Currently only admins get an email when a link is reported. is there a possibility to change this, so that admins and member of another group ("ldm-mods") get an email?

thank you!

AndrewD 08-21-2007 08:06 AM

Quote:

Originally Posted by General_ (Post 1322165)
Hi AndrewD,

Currently only admins get an email when a link is reported. is there a possibility to change this, so that admins and member of another group ("ldm-mods") get an email?

thank you!

Certainly a possibility. I don't think that this will make the official release of 2.2.8, but I'll see what can be done.

General_ 08-21-2007 11:21 AM

Quote:

Originally Posted by AndrewD (Post 1322167)
Certainly a possibility. I don't think that this will make the official release of 2.2.8, but I'll see what can be done.

so actual there is no option to contrive that?

AndrewD 08-21-2007 12:41 PM

Quote:

Originally Posted by General_ (Post 1322247)
so actual there is no option to contrive that?

From checking the code, I stand corrected. The email should already be sent to anyone who is listed as a moderator for the category in which the report was triggered.

The moderators are anyone who has LDM's *can_moderate_link* permission in the category in question, and anyone who is a vbulletin moderator for the forum that is associated with that category (if any).

AndrewD 08-21-2007 03:37 PM

DarkRyda asked for help with this new 'extra', which patches the VB similar threads feature to display similar entries from LDM.

It works (I hope) with version 2.2.8, and will not work with 2.2.7. It's installed in the normal way (VB/admin/products and plugins/upload plugins).

Will appreciate reports. If ok, it will be included with the final release of 2.2.8 next month.

obmob 08-21-2007 04:32 PM

Quote:

Originally Posted by AndrewD (Post 1322426)
DarkRyda asked for help with this new 'extra', which patches the VB similar threads feature to display similar entries from LDM.

It works (I hope) with version 2.2.8, and will not work with 2.2.7. It's installed in the normal way (VB/admin/products and plugins/upload plugins).

Will appreciate reports. If ok, it will be included with the final release of 2.2.8 next month.

Hmm... interesting, thanks!


All times are GMT. The time now is 02:04 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.03864 seconds
  • Memory Usage 1,878KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (29)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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