News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Images in imode version

Started by zannas, January 24, 2008, 03:53:36 PM

Previous topic - Next topic

zannas

Hello, I like to learn what I do for see a images in [img][/img] in imode version of my forum
Thank you

Bulakbol

I don't really quite understand what you are asking but to see images in post, insert the image url in between the img tags.

[img]http://www.simplemachines.org/community/custom_avatars/avatar_67763.jpg[/img]
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

zannas

yes, but my problem is view these images in a imode version of forum... sorry for my english

karlbenson

Try this, (i'm not 100% it will work).

Open Sources/Subs.php
FIND & REMOVE
// !!! Change maybe?
if (!isset($_GET['images']))
$disabled['img'] = true;

falguni1


karlbenson

Its like a wap/lo-fi/printer friendly version of smf pages, but without stuff that most phones with it can't handle.

Just add ;imode or ;wap to the end of any smf url to see what it looks like.

falguni1


zannas

Quote from: karlbenson on January 25, 2008, 08:44:05 AM
Try this, (i'm not 100% it will work).

Open Sources/Subs.php
FIND & REMOVE
// !!! Change maybe?
if (!isset($_GET['images']))
$disabled['img'] = true;

I try but without results :(. it doesn't work

karlbenson

I guess that was just for 'print' pages.

Ok, I spent a little bit of time figuring out how to do this.
Note it is probably not recommended to do this as I doubt every imode/wap2 compatible phone can view these.

Open Themes/default/Wireless.template.php

FIND
$wireless_message = strip_tags(str_replace(array('<div class="quote">', '<div class="code">', '</div>'), '<br />', $message['body']), '<br>');

There are TWO instances off the above.
One in the function template_imode_display() and the other in the function template_wap2_display()
So you'll need to do this for both

REPLACE with
$wireless_message = strip_tags(str_replace(array('<div class="quote">', '<div class="code">', '</div>'), '<br />', $message['body']), '<br><img>');

Also note, you will need to do this for any other themes which have a Wireless.template.php (although its unlikely that any will have unless they are a carbon copy of the default theme).

zannas

Quote from: karlbenson on January 27, 2008, 12:43:44 AM
I guess that was just for 'print' pages.

Ok, I spent a little bit of time figuring out how to do this.
Note it is probably not recommended to do this as I doubt every imode/wap2 compatible phone can view these.

Open Themes/default/Wireless.template.php

FIND
$wireless_message = strip_tags(str_replace(array('<div class="quote">', '<div class="code">', '</div>'), '<br />', $message['body']), '<br>');

There are TWO instances off the above.
One in the function template_imode_display() and the other in the function template_wap2_display()
So you'll need to do this for both

REPLACE with
$wireless_message = strip_tags(str_replace(array('<div class="quote">', '<div class="code">', '</div>'), '<br />', $message['body']), '<br><img>');

Also note, you will need to do this for any other themes which have a Wireless.template.php (although its unlikely that any will have unless they are a carbon copy of the default theme).
Thank YOU!!!

SudeeraJ

My Implimentation Of SMF:
http://www.tmmlk.com [nofollow]


Advertisement: