PDA

View Full Version : [REQ] Nice Image Alignment for News


Azuma
02-08-2006, 08:58 PM
I remember somone released a hack on here that allowed you to position images in your posts all nice like. Something like this:

http://www.joystiq.com/2006/02/07/gta-worth-900-million-look-to-psp-for-future-of-franchise/

You see the images flows nicely on the left, with the text just "sqeezed" next to it. Whenever I put an image normally, vb just moves the text below or above the images, and it makes it look very unprofessional.

I tried using html, but that didn't quite work as good as I thought. Could anyone come up with a solution? Thank you very much. :)

Gandalf-LoJ
02-09-2006, 07:51 AM
Custom BB code will do this.

Go to your BB Code Manager in the Admin CP and click Add New BB Code. Then fill out below (replacing the URL's with examples from your site)

You can see it in action here, http://www.seka.org.uk/cmps_index.php?cc=welcome as most of our news articles have images with the align option used.

Title: Image tag with Alignment

Tag: imga

Replacement: <img src="{param}" align="{option}" border="0" alt="" style="padding:7px;" />

Example: http://www.seka.org.uk/uploads/images/SBone.gif

Description: The above example will left align the image. Valid options are left | right

Use {option} Yes

Button Image (Optional) If you would like this bbcode to appear as a clickable button on the message editor toolbar, enter the URL of an image 21 x 20 pixels in size that will act as the button to insert this bbcode. (I left this blank)

Our Sponsors
 

Azuma
02-09-2006, 06:27 PM
Works beautifully! Thank you thank you!

Wow, very nice. Greatly appreciated. :)

Gandalf-LoJ
02-10-2006, 03:11 AM
glad to be of help :)

Our Sponsors
 

Decipher
03-03-2006, 04:22 AM
many thanks gandalf-Loj! This is was so easier and better IMO than trying to get some first but not all attachments displayed inline in the news post. lol this way you get add an attachment, [imga] the attachment source..and in the adv_newsbits just delete the attachment code...very clean..

I only have one small problem Gandalf-Loj I was hoping you could give me some advice. In your news posts on your site, attachments are not displayed and this is the same for when the news post is viewed in the forum: http://www.seka.org.uk/forum/showthread.php?t=3204

Is it possible to edit the vb's postbits template to show attachments in posts everywhere but in the news forums?
Many thanks in advance ;)

Gandalf-LoJ
03-03-2006, 05:46 AM
The reason that attachements are not shown in the news posts is because our news posters don't use the attachment system.

I've setup a little subfolder within the site that certain people have ftp access to so they can upload the documents to be linked to in the news posts. This 'document store' makes my life easier as non technically minded users don't have ftp access to the main site and so can't cause any damage :)

As far as editing the postbit for a particular forum to remove attachments, sure that should be possible as you can assign specific templates to certain forums, but this will override user set templates (if you allow this). As for how to edit the templates, I don't know as I've not done this!

You may have some luck asking on www.vbulletin.org

freez
03-03-2006, 06:34 PM
thanks for this info , it works great ,clicks install :p :D

Decipher
03-04-2006, 05:55 AM
ahh i see..thanx for the info Gandalf
I'm thinking of putting an image upload form somewhere in the admincp for moderators who dont know the ftp..

Gehanna
03-04-2006, 01:40 PM
This worked wonderfully! Thank You Gandalf :)

Sincerely,
Gehanna

Gandalf-LoJ
03-07-2006, 03:57 AM
ahh i see..thanx for the info Gandalf
I'm thinking of putting an image upload form somewhere in the admincp for moderators who dont know the ftp..

Well, maybe this (http://www.vbulletin.org/forum/showthread.php?t=101285&highlight=file+uploader) will do what you require?

Azuma
03-16-2006, 04:52 PM
Yeah it would be wonderful if vbadvanced had some type of "news image uploader" built into it. Something kind of like what Subdreamer uses.

burley
05-02-2006, 10:46 AM
aah, that's how everybody does this! :D
Really cool thing, thanks!

anybody know a way to make sure that the code between the [imga] tags are not counted as text on the portal newsmodule?

Gandalf-LoJ
05-02-2006, 10:55 AM
aah, that's how everybody does this! :D
Really cool thing, thanks!

anybody know a way to make sure that the code between the [imga] tags are not counted as text on the portal newsmodule?

Just make sure that 'Enable vBcode for News?' and 'Enable vBimage code for News?' are both yes on the pages that you want to show the news. These options are within the 'News Options' for the relevant pages.

burley
05-02-2006, 10:59 AM
hmm, strange. I don't see those options.

which cmps version are you referring to?

Gandalf-LoJ
05-02-2006, 11:19 AM
hmm, strange. I don't see those options.

which cmps version are you referring to?


v2.1.0

PoetJC
06-23-2006, 09:00 PM
Nice share - Thanx

Jacquii.

butty
06-25-2006, 07:54 PM
cheers for that gandalf was wondering myself how i would get images to align properly :)

popac
09-07-2006, 11:54 AM
tnx m8, good solution !

chkdg8
11-16-2006, 05:01 AM
Great mod! Exactly what I needed, thank you.

necronos
12-06-2006, 01:45 PM
awesome....

see it in action: www.hordlinger.de

thanks a lot!

chkdg8
12-06-2006, 01:48 PM
Does anyone host their images by outsourcing or would you rather host them on your server?

SoKo
03-04-2007, 02:34 AM
Custom BB code will do this.

Go to your BB Code Manager in the Admin CP and click Add New BB Code. Then fill out below (replacing the URL's with examples from your site)

You can see it in action here, http://www.seka.org.uk/cmps_index.php?cc=welcome as most of our news articles have images with the align option used.

Title: Image tag with Alignment

Tag: imga

Replacement: <img src="{param}" align="{option}" border="0" alt="" style="padding:7px;" />

Example: http://www.seka.org.uk/uploads/images/SBone.gif

Description: The above example will left align the image. Valid options are left | right

Use {option} Yes

Button Image (Optional) If you would like this bbcode to appear as a clickable button on the message editor toolbar, enter the URL of an image 21 x 20 pixels in size that will act as the button to insert this bbcode. (I left this blank)


I am a little confused here. I am a relatively new user and have to have things broken down in english. Can you explain how the module should be setup to use this?

Thanks,
Soko

Gandalf-LoJ
03-05-2007, 08:45 AM
It's not a module. It's nothing to do with vb advanced but uses the custom bb code creator within vBulletin.

Just goto the BB Code Manager in the Admin CP and all should become clear.

Mitsuomi
10-31-2007, 03:16 PM
It dosen't work to me :S I create the bb code, but nothin happend, i want to put the avatar of the member at the right and the image to the left, but the image apears below the text and the avatar at the left of the screen. Watch: www.argentina-anime.com.ar I don't know what to do any more. Please help me.

FrontRunner
10-31-2007, 05:00 PM
It dosen't work to me :S I create the bb code, but nothin happend, i want to put the avatar of the member at the right and the image to the left, but the image apears below the text and the avatar at the left of the screen. Watch: www.argentina-anime.com.ar (http://www.argentina-anime.com.ar) I don't know what to do any more. Please help me.

Not sure it will work but could use this code, instead of align it uses float, replace option with either left or right and param with the url to the image you want to use.

<img src="{param}" style="margin: 5px; float: {option};" alt="" title="" />

Mitsuomi
11-01-2007, 11:39 AM
But i don't want to use a specific image, i want to use the images of the atachment that the user used to put they news into the index page.
If you can see the news have diferent images, not the same.

Edited: I just fix it, i don't know how, but works like i want :P Tks anyway

burley
07-13-2008, 06:03 AM
Wondered if there was any update on this, maybe somebody added some xtra functionality?

let me know