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. ;)

artpapa 10-05-2005 09:41 PM

Thank you, Tim!
This is great addition to the artists forum.

Do think it's possible (and how) to insert "View Users Attachments" link to the Forum Display, Thread View and Members List?
Alexei

.Tim 10-05-2005 09:46 PM

Yeah, I'll work on that and get back to you.

Allan 10-05-2005 10:18 PM

Thanks for this hack Tim, very nice ;)

Click Install :)

idander 10-08-2005 01:04 PM

Nice thxx

.Tim 10-08-2005 08:26 PM

Update:

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 src="$stylevar[imgdir_misc]/paperclip.gif" border="0" />
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>

.Tim 10-08-2005 11:59 PM

Added some screen shots of the various links this hack creates.

J?Y. 11-10-2005 07:17 PM

Thanks!!! A++

Arios 11-11-2005 04:08 AM

Now that is fun. So easy :up:

reeferman 03-11-2006 02:12 AM

very cool!

Does anyone know if it is possible to add an <if condition so that the link to the attachments page only shows up if there are actually attachments?

defcon_420 04-11-2006 11:10 AM

"CLICKS INSTALL"

Great hack! if only there was a way to pull all the images from the database and put them in user respective (or a single common) folder/s so i could run a cronjob to once a day upload user attchments to the photogallery.
*sigh*

alapo 04-20-2006 11:45 PM

I noticed there is no close to the link. On our forum (at least with the other mods) this seems to crash IE6... so for anyone who is having crash issues... replace this (in postbit):

Code:

<a href="profile.php?$session[sessionurl]do=editattachments&u=$post[userid]&showthumbs=1"><img src="$stylevar[imgdir_misc]/paperclip.gif" border="0" />
with this:

Code:

<a href="profile.php?$session[sessionurl]do=editattachments&u=$post[userid]&showthumbs=1"><img src="$stylevar[imgdir_misc]/paperclip.gif" border="0" /></a>
Just add a </a> to the end. I'd be interested to know if anyone else is experiencing crashing in IE6 (not FF and not IE7) due to this, or if it's specific to us.

defcon_420 04-21-2006 12:39 AM

you rock alapo! that fixed my site from crashing in IE 6
had alot of members complaining they were having problems but that seems to have done the job!

voter 08-08-2007 02:34 PM

Works perfect for 3.6.
Clever boy Tim keep going...

Any idea how to show the result as a real thumbnails of attachments and not that small image icons...

voter 08-08-2007 02:49 PM

I suggestion use a vbphese say
<a href="profile.php?$session[sessionurl]do=editattachments&u=$post[userid]"><phrase 1="$userinfo[username]">$vbphrase[attachments_posted_by_x]</phrase></a>

Kihon Kata 10-26-2008 02:59 PM

Updated my new member profile page. Works on 3.7.3

Dimoks 08-27-2009 12:03 PM

Don't working in 3.8.3 ... :(

after add first code In profile I have links
Code:

http://www.kharkovforum.com/profile.php?do=editattachments&u=&showthumbs=1
but I need link
Code:

http://www.kharkovforum.com/profile.php?do=editattachments&u=12345&showthumbs=1
:(


All times are GMT. The time now is 10:31 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.01285 seconds
  • Memory Usage 1,778KB
  • 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
  • (18)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (26)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete