News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Custom View of Attachments

Started by Bugo, January 19, 2011, 10:19:22 PM

Previous topic - Next topic

Bugo

Do you want only the small spaces between attachments? Just open Subs-CustomView.php, find
<table width="90%">
and remove width attribute.

Arvacon

Actually I want my attachment pictures to look like at this forum's post http://www.cnchobby.gr/forum/default.aspx?g=posts&m=20208#post20208 .
Try to zoom-in, zoom-out and you will understand what I mean.
I did the change that you said at the code, but that is not exactly what I need.
If you can't open the above link, tell me to take some screen shots for you.

Bugo


Arvacon

Friend I don't know how to thank you!
At my local installation it workes like charm!  :D

Thank you very much  :)
I will test it at my live forum too and if there is any problem, I will inform you.

Grettings from Greece!
Kostas

Arvacon

Hi Bugo.
I noticed that when you have 1024x768 resolution, it keeps have an uncompleted space at the right side, when it could be filled with pictures too.
That happens at the other resolutions too, but it seems vividly at the above resolution, as the pictures follow two vertical series instead of 3.
Is there any way to correct this too? 

Arvacon

#45
Finally I found a problem  :(
The appearance of the posts doesn't looks correct now. This had happen again when I first installed your mod, but after I installed the new hooks, everything was fine.
What do I need to change to fix this and the above post's problem too?


Hristo

Quote from: Arvacon on January 04, 2013, 02:36:53 PM
...when it could be filled with pictures too.
....
Is there any way to correct this too?
No, there is no enough space for another image. I have no access to your forum, but I'm sure this can be fixed with some small css tweaks. Just use your browser's dev tool to check the left and right attached images margin, then apply it in your theme's index.css.


Arvacon

#47
I think there is space for another image, it just need to be closer to each other as it happens when you have the default Subs-CustomView.php file and you choose "Max attachments per line" = 3
(as at the bellow photo).

Edit: I forgot to mention that I found also that the text at posts, when it has a lot of letters, it seems as at the photo, with a bar under them too, but I don't know if this is because of this mod or any other mod.
Just in case this is easy to be fixed or this mod cause it, if you have any solution for this too, I would appreciate if you could help about this too.
  Finally this is not an issue of this mod, it is just happening when you have lot of letters in a row, without meaning. When you have words and documents, everything works fine, as they mention here http://www.simplemachines.org/community/index.php?topic=488069.0

Edit2: I found that when I have the new Subs-CustomView.php file installed at my forum, except from the problems at the template's appearance, the quick edit function's save button doesn't respond. If I replace this file with the default one, the template and the quick edit are fine. Maybe these info help u more.

Bugo


Arvacon

#49
I tried it just now and it seems the template problem solved.
Also the pictures now can auto aligned.
I just see a small problem when you have different size pictures at the same post, as it seems at the screen shots bellow. Actually that is not so big problem, but it would be nice if you could correct it too (by the way, if you have same size pictures, everything looks in line as at "same size" photos bellow).
Thank you for your time, I really appreciate it.

Edit: I made some corrections at the picture's names.

Calaad

Hello,

I just add this mod to my forum. Last version of forum, last version of mod.

When i select "in the line" with or without filename, attachments just disappear. They're back when i select "In column". I install new hook without any change.

I've custom theme, could it be the source of the problem ?

Thank by advance and for the work done !

Calaad.

Bugo

What theme are you using? SMF version?

Calaad

#52
Hello,

I'm using an homemade theme, based on curved. My SMF version is 2.0.4.

If it can help, i join a screenshot of my installed extension.

Bugo

Try New Hooks 0.3, and select "Install in Other Themes" (homemade) on install.

Calaad

It works !

Thanks a lot Bugo ! :)

madvex

#55
Quote from: Bugo on March 01, 2013, 05:20:14 AM
Try New Hooks 0.3, and select "Install in Other Themes" (homemade) on install.

In SMF 2.0.5 the New Hooks 0.3 file is a must.

As others reported, I also had the horizontal setting causing all attachments to disappear.  The New Hooks file install rectified those issues.
Some manual tweaks for padding in the CSS it works great!

Excellent mod! Thanks!

PS: The manual CSS tweak I performed for the padding is as follows:
In your current theme CSS folder, edit "index.css" as follows:

Find:
.attachments div {
padding: 0 0.5em;
}


Replace with:
.attachments div {
  padding: 2em 1em;
}


I'd recommend using firebug and play with the settings before making the actual edit so you can see the effects in real-time.
Or, you can comment out the old lines if you want to easily revert.

Advertisement: