vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   View Users Attachments (https://vborg.vbsupport.ru/showthread.php?t=97320)

.Tim 10-01-2005 10:00 PM

View Users Attachments
 
This allows you to put a link in users profiles to allow their attachments to be viewed.

In the MEMBERINFO template

Find:

Code:

<if condition="$show['usernotes']">
                        <div class="fieldset">
                                <div

Add above it:

Code:

<a href="profile.php?$session[sessionurl]do=editattachments&u=$post[userid]&showthumbs=1">View Users Attachments</a>
To add link in postbit.
In your postbit (or postbit legacy) template find:

Code:

<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a></if>
And add after:

Code:

<a href="profile.php?$session[sessionurl]do=editattachments&u=$post[userid]&showthumbs=1"><img class="inlineimg" src="$stylevar[imgdir_misc]/paperclip.gif" border="0" /></a>
For link in member list.

Find in memberlist template:

Code:

<if condition="$show['avatarcol']"><td class="thead" nowrap="nowrap">$vbphrase[avatar]</td></if>
Add after:

Code:

<td class="thead" nowrap="nowrap">Attachments</td>
Find in memberlist_resultsbit template:

Code:

<if condition="$show['avatarcol'] AND exec_switch_bg()"><td class="$bgclass"><if condition="$show['avatar']"><img src="$avatarurl" border="0" $avwidth $avheight alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /><else />&nbsp;</if></td></if>
Add after:

Code:

<td class="$bgclass"><a href="profile.php?$session[sessionurl]do=editattachments&u=$userinfo[userid]&showthumbs=1">View</a> </td>
(I believe you have to have attachments enabled in your vbulletin options to view thumbnails, otherwise they'll just show as links)

No screenshot because it looks just how it looks when you view your own attachments in your usercp, just without the sidebar

Daniel 10-01-2005 11:44 PM

Nice

memorex 10-02-2005 12:20 AM

I agree Nice,

Thanks :)

Bad Bunny 10-02-2005 02:02 AM

Quote:

Originally Posted by memorex
I agree Nice,

Thanks :)

Thanks for this release.
Should there be a session in the url? And is it possible to have a conditional to only show it if the person has attachments?

.Tim 10-02-2005 02:16 AM

Quote:

Originally Posted by Bad Bunny
Thanks for this release.
Should there be a session in the url? And is it possible to have a conditional to only show it if the person has attachments?

Don't think it'd be an issue if it's not in there but I added it anyways.

As far as the conditional, I don't know, this "hack" is really just doing something automatically that you can do manually at any vbulletin board by just adding:

profile.php?do=editattachments&u=1&showthumbs=1

at the end of the forum url and changing u=1 for whatever userid you want to see.

Kihon Kata 10-02-2005 02:45 AM

Quote:

Originally Posted by .Tim
Don't think it'd be an issue if it's not in there but I added it anyways.

As far as the conditional, I don't know, this "hack" is really just doing something automatically that you can do manually at any vbulletin board by just adding:

profile.php?do=editattachments&u=1&showthumbs=1

at the end of the forum url and changing u=1 for whatever userid you want to see.

well with that new fix, it just killed my link.

.Tim 10-02-2005 02:49 AM

Quote:

Originally Posted by TonysDesigns
well with that new fix, it just killed my link.

That's odd, works just fine for me on both Firefox and IE. I guess you can remove the $session[sessionurl] from the code if you're having a problem.

Kihon Kata 10-02-2005 02:59 AM

oh sorry, I had my HTML formatted bad LOL

Thanks

.Tim 10-02-2005 03:00 AM

Haha okay, no problem.

Bad Bunny 10-02-2005 03:34 AM

Quote:

Originally Posted by .Tim
Don't think it'd be an issue if it's not in there but I added it anyways.

As far as the conditional, I don't know, this "hack" is really just doing something automatically that you can do manually at any vbulletin board by just adding:

profile.php?do=editattachments&u=1&showthumbs=1

at the end of the forum url and changing u=1 for whatever userid you want to see.

Yeah, I know. I know. I'm just curious if there is a variable for it. Would rule if there was. Avoid links that don't do anything that way. ;)


All times are GMT. The time now is 10:26 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.01199 seconds
  • Memory Usage 1,747KB
  • 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
  • (8)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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