vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Links and Files Database (https://vborg.vbsupport.ru/showthread.php?t=60403)

13th_Disciple 02-09-2004 10:12 PM

Quote:

Originally Posted by Tradjick
<table cellpadding="0" cellspacing="0" border="0" class="tborder" width="100%">
<tr>
<td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="tcat" style="text-align: center">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('vbindex_customblock$box')"><img id="collapseimg_vbindex_customblock$box" src="$stylevar[imgdir_button]/collapse_tcat$collapseimg_vbindex_customblock.gif" alt="" border="0" /></a>
<strong>Custom Block $box</strong>
</td>
</tr>
<tbody id="collapseobj_vbindex_customblock$box" style="$collapseobj_vbindex_customblock">
<tr>
<td class="alt1">
<div class="smallfont">Block $box Content</div>


<?php
chdir ("./forums");
error_reporting)E_ALL & ~E_NOTICE);
$globaltemplates = array(
'links_main'
);
require once ("./global.php")
eval ('print_output("' . fetch template('links_main') . ");');
?>


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

-------------------------------------------------------------------------------

Blame me but I still got no idea how to do that.

PHP Code:

<table cellpadding="0" cellspacing="0" border="0" class="tborder" width="100%">
<
tr>
<
td>
<
table cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%">
<
tr>
<
td class="tcat" style="text-align: center">
<
a style="float:$stylevar[right]href="#top" onclick="return toggle_collapse('vbindex_customblock$box')"><img id="collapseimg_vbindex_customblock$boxsrc="$stylevar[imgdir_button]/collapse_tcat$collapseimg_vbindex_customblock.gif" alt="" border="0" /></a>
<
strong>Custom Block $box</strong>
</
td>
</
tr>
<
tbody id="collapseobj_vbindex_customblock$boxstyle="$collapseobj_vbindex_customblock">
<
tr>
<
td class="alt1">
<
div class="smallfont">Block $box Content</div>


<
a href="http://www.yourdomain.com/forums/local_links.php?action=links&catid=1">Downloads</a>

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

something like this here will work.. at least that's what i did.. Natch is a bit more aware of the way it works and may be able to give more insight into what you can do well beyond what i demonstrated there.. but that is the hard-coded, simplistic way, that i used on my site..

PixelFx 02-10-2004 12:35 AM

can you add image/text attachment type system in the description fields that if you user group permits, shows images or links of images etc? this is seperate from the file download link ...

this way you could post a description of item, with screenshots then have a download for it ..

Natch 02-10-2004 12:47 AM

Quote:

Originally Posted by gmarik
So I need to link to files or I can upload them as attachments?

You can upload them as attachments, and link to the attachments, or you can simply link to files on your server, or on another server :)


Quote:

Originally Posted by Tradjick
Could you just tell me please what to write into the vbindex_customblock_1 template in order to show the links?

Take a wee look at the Addon I scripted - it's got a simple set of instructions as well as a new template to add, and a new file to upload - the reason I did it this way was to show the number of links to all users for the customblock only - so my new file simply doeesn't make the permissions calls

13th_Disciple 02-10-2004 12:55 AM

Quote:

Originally Posted by PixelFx
can you add image/text attachment type system in the description fields that if you user group permits, shows images or links of images etc? this is seperate from the file download link ...

this way you could post a description of item, with screenshots then have a download for it ..

yar.. i was thinking along those lines too.. also, maybe a couple of custom fields for downloads and links.. such as author/contributor, file size for DL's if it is a DL link..

also maybe a field for a link back to the authors site if it is a DL.. no need if it's just a link.. this way, if a field has no text in it, it's not echoed/printed out on the page.. probably just a template mod for those, but would also have to have a field for each in the db table for the hack as well or maybe a small additional table that only contains certain add-on fields..

is there gonna be adminCP integration at some point? i remember seeing folks ask for that, but don't remember reading an answer for it..

and Natch, you keep coming out with those add-ons and i will keep adding em on to my site.. :p

Natch 02-10-2004 02:00 AM

AndrewD decided that AdminCP integration was no t the way to go - as I used the HTL to install this, it created my AdminCP link for me ... but all it does is link from the sidebar menu of the ACP to the admin link of the script ... easy to add :)

AndrewD 02-10-2004 03:04 AM

Quote:

Originally Posted by 13th_Disciple
yar.. i was thinking along those lines too.. also, maybe a couple of custom fields for downloads and links.. such as author/contributor, file size for DL's if it is a DL link..

also maybe a field for a link back to the authors site if it is a DL.. no need if it's just a link.. this way, if a field has no text in it, it's not echoed/printed out on the page.. probably just a template mod for those, but would also have to have a field for each in the db table for the hack as well or maybe a small additional table that only contains certain add-on fields..

is there gonna be adminCP integration at some point? i remember seeing folks ask for that, but don't remember reading an answer for it..

and Natch, you keep coming out with those add-ons and i will keep adding em on to my site.. :p

Author/contributor is already there - just modify the links_linkbit' template to refer to $linkusername. You should probably think about who can see this information.

DL Filesize should be there, and will be next time.

Other items like link back to the authors site, images and so on can all be done by including standard bbcodes in the link/category descriptions when you set up/edit the link/category. It just requires a bit of discipline in how you lay out the entry.

I avoided admincp integration - I try to keep hacks as free of VB as possible, to avoid difficulties when upgrading. But as Natch says, it's just a link, so as/when I get round to understanding htl properly, I may find that that is the way to do it.

Sadie Frost 02-10-2004 04:14 AM

Quote:

Originally Posted by AndrewD
All those messages are correct, up to the last SQL error. Did you carry out steps 2 and 3 as instructed - i.e. in step 3 did you enter a valid forum id into the box halfway down the page? I know that the code should not fall over if you forget - I shall fix that - but it looks to me as if you haven't initalised the database tables correctly. Try looking at step 3 again.

I am really dumb - getting the same error as Tradjick - where exactly is the box?

Tradjick 02-10-2004 06:37 AM

@Sadie Frost:

Edit: try this:

1.) you have to overwrite a style of your chice with the included .xml file.

2) use a link similar to this http://localhost/forum/local_links.php?s=&styleid=X
while X is the styleid that you overwrote in step 1.

3) link to this: http://localhost/forum/local_links.php?action=admin

4.) link to this: http://localhost/forum/local_links.php?action=links

Mickie D 02-12-2004 02:28 PM

erm i can add a catogorie fine but i cannot see it :(

and i dont get any links up to view either i get the links navbar with search and links

i get the admin section, i think i get most of it but i cant see anything under the links bar :(

also i am using my general chat room for the permissions as it lets everyone view it :)

please help this seems so good but i am just lost as to what is going wrong for me


also it installs fine but where is the links ???

13th_Disciple 02-12-2004 03:01 PM

what's the URL of your site?


All times are GMT. The time now is 04:21 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.01920 seconds
  • Memory Usage 1,770KB
  • 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_php_printable
  • (6)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
  • (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