![]() |
|
#1
|
||||
|
||||
|
I have been using this for years and surprisingly, it still works in 3.0 RC1. I have put what works for me from this long, old, confusing, VBA CMPS 1.x thread. This takes the attachments out of the attached images fieldset, then alternates them from left to right down your page.
The original code breakers were ptourvi1@twcny and Tom M. In adv_portal_newsbits, find: Code:
$news[message] <if condition="$show['signature']"> <div>__________________<br /> $news[signature]</div> </if> </td> </tr> <if condition="$news['attachment']"> <tr class="alt1"> <td> <fieldset class="fieldset"> <legend>Attached Files</legend> <div style="padding:$stylevar[formspacer]px"> $news[attachment] </div> </fieldset> </td> </tr> </if> Code:
<if condition="$news['attachment']">
<span style="float: left; margin: $stylevar[cellpadding]px $stylevar[cellpadding]px $stylevar[cellpadding]px 0px">
$news[attachment]
</span>
</if>
$news[message]
<if condition="$show['signature']">
<div>__________________<br />
$news[signature]</div>
</if>
</td>
</tr>
To get the images to alternate left/right: Find: Code:
<if condition="$news['attachment']">
<span style="float: left; margin: $stylevar[cellpadding]px $stylevar[cellpadding]px $stylevar[cellpadding]px 0px">
$news[attachment]
</span>
</if>
Code:
<if condition="$news['attachment']">
<if condition="$newscount % 2">
<span style="float: left; margin: $stylevar[cellpadding]px $stylevar[cellpadding]px $stylevar[cellpadding]px 0px">
<else />
<span style="float: right; margin: $stylevar[cellpadding]px 0px $stylevar[cellpadding]px $stylevar[cellpadding]px">
</if>
$news[attachment]
</span>
</if>
Last edited by glorify; 09-11-2007 at 07:35 PM. |
|
#2
|
|||
|
|||
|
How can I do in order to show thumbnail always in top left?
Now is showing in the middle of the new: Demo: www.technogalicia.com |
|
#3
|
||||
|
||||
|
Only the bottom part of the code is for the images to alternate left/right. Just do the first edit.
This was for a single column news so I don't know how it will work with your 2 column news. |
|
#4
|
||||
|
||||
|
Hello I tried using this mod and I still get the picture on top of the news Look hereHow would I make this work right ? I used insert image for the image and tried align left and align Right and also decrease left and right I would love to used this mod please if anybody can work me thought this Ill be very greatful
Thanks |
|
#5
|
|||
|
|||
|
Can someone apply the highslide or lightbox/thickbox into this hack? Right now, if you click on the image on the CMPS page, it opened to a new page.
Edit: I figured it out myself. Here is how to do it. 1/ Go to your admincp, select your style, All style options, headinclude and put the below code at the end Code:
<script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="js/lightbox.js"></script> <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /> Quote:
http://www.vbulletin.org/forum/showthread.php?t=123235 And that's it. Last edited by fozo; 10-15-2007 at 02:23 PM. |
|
#6
|
|||
|
|||
|
Can u tell me what exactly u put in just to get highslide to work on the frontpage?
thanks |
|
#7
|
|||
|
|||
|
Can somebody tell me what do i need to modify so that when the user clicks on thumnbail to go to the post where is attached, and not to actually open the picture ?
Thx in advance ! |
|
#8
|
|||
|
|||
|
Nobody knows ?
|
|
#9
|
|||
|
|||
|
I know this post is old but... Anyone know how to just show the first atached image?
Thansk! |
|
#10
|
|||
|
|||
|
cool- works great
|
|
#11
|
|||
|
|||
|
how do you get the attachments bigger in the news page?
|
|
#12
|
|||
|
|||
|
I want this for vbulletin 4 .
|
|
#13
|
|||
|
|||
|
Would also like to see this for VB4
|
|
#14
|
|||
|
|||
|
For those who want this for V4 here you go:
Find: Code:
<blockquote class="postcontent restore">{vb:raw news.message}</blockquote>
</td>
</tr>
</table>
<vb:if condition="$show['signature']">
<div>__________________<br />{vb:raw news.signature}</div>
</vb:if>
</div>
<vb:if condition="$news['attachment']">
<div class="attachments">
<fieldset>
<legend>{vb:rawphrase attached_files}</legend>
<vb:each from="news[attachment]" value="attachment">
<vb:if condition="$attachment['hasthumb']">
<a href="{vb:raw vboptions.bburl}/attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&d={vb:raw attachment.dateline}" rel="Lightbox{vb:raw attachment.lightboxid}" id="attachment{vb:raw attachment.attachmentid}"<vb:if condition="$show['newwindow']"> target="_blank"</vb:if>><img src="{vb:raw vboptions.bburl}/attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&stc=1&thumb=1&d={vb:raw attachment.thumbnail_dateline}" class="thumbnail" border="0" alt="{vb:rawphrase image_larger_version_x_y_z, {vb:raw attachment.filename}, {vb:raw attachment.counter}, {vb:raw attachment.filesize}, {vb:raw attachment.attachmentid}}" /></a>
<vb:else />
<div>
<img class="inlineimg" src="{vb:stylevar imgdir_attach}/{vb:raw attachment.attachmentextension}.gif" alt="{vb:rawphrase file_type_x, {vb:raw attachment.attachmentextension}}" width="16" height="16" border="0" style="vertical-align:baseline" /> <a href="{vb:raw vboptions.bburl}/attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}">{vb:raw attachment.filename}</a>
({vb:raw attachment.filesize}, {vb:rawphrase x_views, {vb:raw attachment.counter}})
</div>
</vb:if>
</vb:each>
</fieldset>
</div>
</vb:if>
Code:
<blockquote class="postcontent restore">
<span style="float: left; margin: $stylevar[cellpadding]px $stylevar[cellpadding]px $stylevar[cellpadding]px 0px">
<vb:each from="news[attachment]" value="attachment">
<vb:if condition="$attachment['hasthumb']">
<a href="{vb:raw vboptions.bburl}/attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&d={vb:raw attachment.dateline}" rel="Lightbox{vb:raw attachment.lightboxid}" id="attachment{vb:raw attachment.attachmentid}"<vb:if condition="$show['newwindow']"> target="_blank"</vb:if>><img src="{vb:raw vboptions.bburl}/attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&stc=1&thumb=1&d={vb:raw attachment.thumbnail_dateline}" class="thumbnail" border="0" alt="{vb:rawphrase image_larger_version_x_y_z, {vb:raw attachment.filename}, {vb:raw attachment.counter}, {vb:raw attachment.filesize}, {vb:raw attachment.attachmentid}}" /></a>
<vb:else />
<div>
<img class="inlineimg" src="{vb:stylevar imgdir_attach}/{vb:raw attachment.attachmentextension}.gif" alt="{vb:rawphrase file_type_x, {vb:raw attachment.attachmentextension}}" width="16" height="16" border="0" style="vertical-align:baseline" /> <a href="{vb:raw vboptions.bburl}/attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}">{vb:raw attachment.filename}</a>
({vb:raw attachment.filesize}, {vb:rawphrase x_views, {vb:raw attachment.counter}})
</div>
</vb:if>
</vb:each>
</span>
{vb:raw news.message}</blockquote>
Last edited by ryan; 08-27-2012 at 05:06 PM. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can Dyna's attachments be in the vBulletin attachments folder too? | eJM | "How Do I..." Questions | 2 | 08-19-2007 01:31 PM |
| Alternating banner links | Zooktalk | "How Do I..." Questions | 1 | 08-09-2005 11:08 AM |