News:

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

Main Menu

In Line Attachments -- ILA

Started by Spuds, April 17, 2010, 06:45:49 AM

Previous topic - Next topic

Lorthand

can anyone tell me how to make guests to view attachments?
Thanks!

Spuds

Its not a 'forum' setting per say but a permission

admin -> permissions -> general permissions -> guests -> allow to view attachments

Lorthand

Quote from: Spuds on April 01, 2011, 11:06:30 PM
Its not a 'forum' setting per say but a permission

admin -> permissions -> general permissions -> guests -> allow to view attachments

Had already checked "Allow to view attachments" in the guests permissions, but after install this mod they can not see. Shows them the messaje "Guest can not view attachments" included in modifications.english.php by ILA...
Any suggestions?
Thanks!

Spuds

Are guest allowed to view the board(s) that you are getting that message on?  Admin -> forum -> boards -> modify boards -> modify  If they have both board permissions and user group permissions then I don't know.

TheCodfather

great mod thanks spuds works on rc5 100% no problems at all

Neverhurry

Hi Spuds,

ILA is a great mod, but unfortunately I encountered a conflict with PortaMx portal (PortaMx v1.0 RC4 ): I have created a Multiple boardnews block (a php block) and works very well, but if I install ILA, then when I open my forum frontpage I got this erorr:

QuoteFatal error: Cannot redeclare template_main() (previously declared in /home/.../public_html/.../Sources/Load.php(2176) : eval()'d code:17) in /home/.../public_html/.../Sources/Load.php(2176) : eval()'d code on line 881

It must be a very small problem, I have asked in PortaMX but I got no answer there, so I ask here, maybe you can help. Aparently there is twice declaration of the template_main(), but I don't know how to repair it.

Thank you very much.
I am using SMF 2.0.1, curve themes.

Spuds

Yeah there is a know conflict between the those, I've never been able to figure it out fully but to be honest I don't use portalmx and figuring out why is not on my current list of things to do.

There is a check in place in Subs.php to not fire ILA if the page that was rendering was portalmx front page that seemed to be working for a while, could be that its not working with the latest portalmx.  The code is in subs.php is
if ((isset($context['pmx_forumReq']) && empty($context['pmx_forumReq'])) && ($context['PortaMx']['settings']['frontpage'] != 'none' || !empty($_REQUEST['spage'])))
{   
// Just a dummy comment so whether the portalMX front page is loaded or there is a page you can request to test
}


There was a post about this on the portalmx site and thats were I got the above code FWIW.

Neverhurry

Quote from: Spuds on April 14, 2011, 10:04:55 AM
Yeah there is a know conflict between the those, I've never been able to figure it out fully but to be honest I don't use portalmx and figuring out why is not on my current list of things to do.

There is a check in place in Subs.php to not fire ILA if the page that was rendering was portalmx front page that seemed to be working for a while, could be that its not working with the latest portalmx.  The code is in subs.php is
if ((isset($context['pmx_forumReq']) && empty($context['pmx_forumReq'])) && ($context['PortaMx']['settings']['frontpage'] != 'none' || !empty($_REQUEST['spage'])))
{   
// Just a dummy comment so whether the portalMX front page is loaded or there is a page you can request to test
}


There was a post about this on the portalmx site and thats were I got the above code FWIW.

Thank you my friend! Can you give me a link of above mentioned post in Portamx?
I am using SMF 2.0.1, curve themes.

Spuds

I believe this was the thread where it was discussed.  If there is an update to prevent the two mods from conflicting I will be glad to make changes.

http://portamx.com/1850/fatal-error-bei-aktivierung-von-neue-themen-block/msg10670/#msg10670

r2d2-trader

Hey Spuds,

maybe it would help to change the ILA-mods usage of your custom bbc. I would suggest to change the mod to use

'before' = [attachxxx]
'after' = [/attachxxx]

maybe this would fix the issue with portamx. If it is possible to change your mod this way i would test it with PortaMX. I also have posted on PortaMX some questions. I think there are some changes in the newest PortaMX-Version that ignores the changes for ILA-mod in the Subs.php. Hope to get an answer to fix this.

cu Rob
"Aller Anfang ist leicht, und die letzten Stufen werden am schwersten und seltensten erstiegen."
Johann Wolfgang von Goethe

r2d2-trader

.. ok. There were some changes in PortaMX RC1.0 - therefore the Code for the ILA-mod must be changed for the use of PortaMX RC1.0.


// Sift out the bbc for a performance improvement.

// ILA in line attachment changes
if ((isset($context['pmx']['forumReq']) && empty($context['pmx']['forumReq'])) && ($context['pmx']['settings']['frontpage'] != 'none' || !empty($_REQUEST['spage'])))
{
// Just a dummy comment so whether the portalMX front page is loaded or there is a page you can request to test
}
elseif (empty($parse_tags) && empty($context['uninstalling']))
{
global $sourcedir;

if (stripos($message, '[attach') !== false)
{
if (!function_exists('ila_hide_bbc'))
require_once($sourcedir . '/ILA-Subs.php');
ila_hide_bbc($message);
}
}
// End ILA in line attachment changes


But Highslide will not show the Images, only the BBC-Code. Maybe someone has in idea.

cu Rob

"Aller Anfang ist leicht, und die letzten Stufen werden am schwersten und seltensten erstiegen."
Johann Wolfgang von Goethe

Spuds

@r2d2-trader

Thank you for the update to the portaMX code, I'll make those changes to the package in a short while and place the update on the site.

live627

stripos() is PHP5 only. Since you are checking to make sure its value isn't false strictly, you can use stristr() or even a combination of strpos() and strtolower()

Arantor

stripos is defined in Subs-Compat.php if SMF is running on an older version of PHP... (and it's defined to strtolower both the needle and haystack and then strpos on it)

feline

Quote from: Spuds on April 17, 2011, 10:11:37 AM
Thank you for the update to the portaMX code, I'll make those changes to the package in a short while and place the update on the site.
Better you use follow code:

if(empty($context['pmx']['forumReq']) && empty($context['pmx']['pageReq']) && empty($_GET['pmxerror']) && $context['pmx']['settings']['frontpage'] != 'none')

Spuds

Quote from: feline on April 19, 2011, 07:00:38 AM
Quote from: Spuds on April 17, 2011, 10:11:37 AM
Thank you for the update to the portaMX code, I'll make those changes to the package in a short while and place the update on the site.
Better you use follow code:

if(empty($context['pmx']['forumReq']) && empty($context['pmx']['pageReq']) && empty($_GET['pmxerror']) && $context['pmx']['settings']['frontpage'] != 'none')

Thanks feline, I'll update the portaMX check to that version.

Quote from: live627 on April 19, 2011, 03:04:28 AM
stripos() is PHP5 only. Since you are checking to make sure its value isn't false strictly, you can use stristr() or even a combination of strpos() and strtolower()
Thank you for seeing that.  As Arantor pointed out SMF has that available as a compatibility function and also in this case I  actually copied that same function to the bottom of ILA-Subs.php since I was not sure when Subs-Compact was loaded.  Also in ILA-Subs there is a str_ireplace function for php4 which I also needed.

GlitchPC

#216
Great mod!  Absolutely love it!  Thanks for a very nice mod...:)

Not sure if it currently has any issues with SimplePortal...but, will let you know if it does...;)

Edit:  Works great with SP...no issues!  Phew!

Hawkmoth

Hi Guys

Wounder if you can help me.
I have SMF 2.0 and I'm getting a few errors.

I've posted on another thread but was advised to do one here.

The errors I am getting are like these:-
smf/index.php?action=dlattach;topic=1487.0;attach=3652;image
2: Invalid argument supplied for foreach()
File: smf/Sources/Subs.php

and

smf/index.php?action=dlattach;topic=1487.0;attach=3652;image
8: Undefined index: forum_name_html_safe
File: smf/Themes/default/Login.template.php (kick_guest sub template - eval?)

smf/index.php?action=dlattach;topic=1487.0;attach=3652;image
2: array_reverse() [<a href='function.array-reverse'>function.array-reverse</a>]: The argument should be an array
File: smf/Sources/Subs.php


I have the following packages installed:-
Aeva Media 1.1b
Look But No Read 1.3
Stop Spammer 2.3.9
InLine Attachments 1.11

All the best
Hawkmoth

Spuds

Can't really say, although does not seem like it would be this mod (e.g. forum_name_html_safe and kick_guest sub template are not part of this mod) but TBH I'm not going to spend any time trying to debug this when you have a very old version of Aeva installed and another mod that was last updated for 2.0 RC4.  You really need to remove those old mods, notably Aeva and then add one mod at a time and make sure things work before you add another.

Hawkmoth

Hi
I said the same thing about Aeva in my origanal post so I'm not sure why I was recommended to come here.

Sorry for the inconvenience.

I'll update Aeva first and then see what I have left.

Thanks

Advertisement: