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)

CamJM 10-30-2007 02:08 AM

Quote:

Originally Posted by AndrewD (Post 1363100)
If you want to put something in each entry, then you have to edit one/several of the links_linkbit templates. There are several of these, depending on which layout you are using. Each of them takes the form of a table row definition, looking like this:
PHP Code:

<tr id="linkid$linkid">
<
td colspan="2">
...
</
td>
</
tr


For patching the main layout, above/below the list of entries, it's the links_main template. In fact that template already has some placeholder variables, via an array variable, $includeinmain. Set one of these array elements: precat, postcat, prefeat, postfeat, prelink, postlink, prestats, poststats, e.g. using the ldm_maindisplay_end hook.

Hi Andrew, sorry to say this but I'm a bit of a coding novice, how would I use the ldm_maindisplay_end hook within the place holders? All I really intend on doing is placing a line of text in there if that makes it simpler at all. Thanks.

AndrewD 10-30-2007 05:43 AM

Quote:

Originally Posted by CamJM (Post 1371622)
Hi Andrew, sorry to say this but I'm a bit of a coding novice, how would I use the ldm_maindisplay_end hook within the place holders? All I really intend on doing is placing a line of text in there if that makes it simpler at all. Thanks.

Here's a couple of examples. Suppose you want to put a box saying "Hello Hello Hello" on all category pages, placed immediately above the list of entries. You can do this in two ways - either write a plugin or edit a template.

You add the plugin by going to vbulletin->admincp->products and plugins->add new plugin.
Choose products=links and downloads manager, hook location=ldm_maindisplay_end, plugin is active=yes. Call the plugin (e.g.) 'annotate' and add the following code:
Code:

if ($viewcatid>0) {
$includeinmain['postcat'] .= '
<table width="100%" class="tborder">
<tr><td class="alt1" align="center">
Hello Hello Hello
</td></tr>
</table>
';
}

This adds a boxed table on all category content pages immediately above the list of entries.

You can achieve the same effect by editing the links_main template. Find the lines which read:
Code:

<if condition="$includeinmain[postcat]">
$includeinmain[postcat]
</if>

Immediately afterwards insert these lines:
Code:

<if condition="$viewcatid>0">
<table width="100%" class="tborder">
<tr><td class="alt1" align="center">
Hello Hello Hello
</td></tr>
</table>
</if>

If you want to add a similar line at the start of the description of each entry, you can also do this with a plugin or by editing a template. Plugin approach:

Again, call the plugin (e.g.) 'annotate', products=links and downloads manager, hook location=ldm_linkbit_create, plugin is active=yes, with the following code:
Code:

$linkdesc = '
Hello Hello Hello
<br />
<br />
' . $linkdesc;

This will work with all choices of linkbit - you don't need to repeat it for each of the available layouts.

Template approach. Edit the links_linkbit template (or the links_linkbit_table, etc templates, depending on your choice of linkbit) and insert the following right at the start:

Code:

<tr colspan="2">
<td align="center">
Hello Hello Hello
</td>
</tr>


hydn 10-30-2007 03:46 PM

I'm struggling with layout issues. I have a broken link that links to:
"ARG:4NDEFINED.php?catid=-8"

Also there's a "lone" statistics box on the bottom-right of all pages. How can I add other stats or anything to the left of it?

Any tips thanks.

hydn 10-30-2007 04:02 PM

Sorry about not much details.

Here's the current code for the stats box:
Code:

<if condition="$viewcatstats or $viewcathits">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<tr><td width="50%">&nbsp;</td>
<td>

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tbody>
<tr align="center">
        <td class="tcat" align="center" colspan="2">
        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('hitparadebit')"><img id="collapseimg_hitparadebit" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_hitparadebit].gif" alt="" border="0" /></a>
        <strong>$vbphrase[ll_statistics]</strong>
        </td>
</tr>
</tbody>
<tbody id="collapseobj_hitparadebit" style="$vbcollapse[collapseobj_hitparadebit]">
<if condition="$viewcathits">
<tr><td class="alt1" colspan="2">
        <span class="smallfont"><strong>$viewcathitstitle</strong></span>
</td></tr>
        $viewcathits
</if>
<if condition="$viewcatstats">
        $viewcatstats

</if>
</tbody>
</table>
</td></tr>
</table>
<br />
</if>

<if condition="$includeinmain[poststats]">
$includeinmain[poststats]
</if>

I'll like to place an identical box to the left of this box with other stats such as. Last 10 downloaded by other users or random 10 downloads.

thanks

AndrewD 10-30-2007 04:11 PM

Quote:

Originally Posted by hydn (Post 1372064)
I'm struggling with layout issues. I have a broken link that links to:
"ARG:4NDEFINED.php?catid=-8"

Have you modified one of the LDM templates at some time in the past or got other hacks installed? A url pointing to catid=-8 is trying to display the most recent entries, and the current templates would construct this in terms of something like:
Code:

        <a href="$SEARCH_SCRIPT.php?action=find&amp;catid=$NEW_CAT">$vbphrase[ll_menu_shownew]</a>
Maybe if you switch on template titles on your vb admincp/options, you can check which template this link is within - I would expect it to be in the links_header template.

Quote:

Originally Posted by hydn (Post 1372064)
Also there's a "lone" statistics box on the bottom-right of all pages. How can I add other stats or anything to the left of it?

This is set up in the links_main template. There a set of code that looks like the following:

Code:

<if condition="$includeinmain[prestats]">
$includeinmain[prestats]
</if>

<if condition="$viewcatstats or $viewcathits">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td width="70%">&nbsp;</td>
<td>
...

You can add other material to the empty 70% cell. Alternatively, you can assign something to the $includinmain[prestats] variable by writing a plugin tied to the links_linkbit_create hook

PitchouneN64ngc 10-30-2007 04:14 PM

AndrewD, I can tell you the French translation is finished, i read it last time (fixing translations bugs and incoherences between phrases) and release it :)

CamJM 10-31-2007 02:29 AM

Awesome Andrew! Thanks for the help :)

obmob 10-31-2007 04:17 AM

Hello, playing again with the new vBa modules... I uploaded the ldm_new.module.

First i coudln't see it, then set clean code to "no" and it start showing.

Now, I made some changes on the template to show a thumbnail, this, because eveything i have has a thumb. :p

So, the code is working, there aren't errors so far, but i figured out a funny thing.

Entries 1,2,5 show a link in the title, but 3 and 4 are just plain text.

You can take a look at this in www.ositobarrigon.com or in the attached image. :D

There are no variables added, just deleted the filetype one and added the thumbnail.

Help! :confused:

Thanks!

CamJM 10-31-2007 05:09 AM

Quote:

Originally Posted by AndrewD (Post 1371706)

Template approach. Edit the links_linkbit template (or the links_linkbit_table, etc templates, depending on your choice of linkbit) and insert the following right at the start:

Code:

<tr colspan="2">
<td align="center">
Hello Hello Hello
</td>
</tr>


Hi Andrew, just one small question, if I set a condition so that only people who aren't logged in see it, it doesn't appear to work. here's what I edited, I have the condition working in other areas of the site..

Code:

<tr colspan="2">
<td align="center">
<if condition="$show['guest']">
Hello Hello Hello
</if>
</td>
</tr>


AndrewD 10-31-2007 05:11 AM

Quote:

Originally Posted by obmob (Post 1372519)
Hello, playing again with the new vBa modules... I uploaded the ldm_new.module.

First i coudln't see it, then set clean code to "no" and it start showing.

Now, I made some changes on the template to show a thumbnail, this, because eveything i have has a thumb. :p

So, the code is working, there aren't errors so far, but i figured out a funny thing.

Entries 1,2,5 show a link in the title, but 3 and 4 are just plain text.

You can take a look at this in www.ositobarrigon.com or in the attached image. :D

There are no variables added, just deleted the filetype one and added the thumbnail.

Help! :confused:

Thanks!

The two entries that are displayed with no link on the text are currently considered to be broken, i.e. LDM can't find the file. Not the best/clearest of signals, I agree.


All times are GMT. The time now is 05:04 AM.

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.03835 seconds
  • Memory Usage 1,768KB
  • 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
  • (1)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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