Site Style Sheet applied to attachment view

Support for mods released by phpbbmodders.net found at either https://github.com/phpbbmodders/ or the MODDB at http://www.phpbb.com
Forum rules
Please only request support for mods released by phpbbmodders.net found at either https://github.com/phpbbmodders/ or the MODDB at http://www.phpbb.com
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Lyndka
New member
New member
Posts: 8
Joined: 06 Feb 2009, 20:54
Contact:

Site Style Sheet applied to attachment view

Postby Lyndka » 13 Jul 2009, 18:28

Hi - a nice easy one for you!!! :P

When clicking on an image in a post which is saved as an attachment e.g. not a link to a referring source such as Photobucket, would it be feasible to apply the Sites style sheet to the page that's created to display the attachment? It really just needs to pick up the page styles and a line colour (to include in the IMG call as a border colour) and to centre the image horizontally on the page.

I've mangled our forum to display centred but accessing the styles is a level of complexity my poor brain isn't up to... ;)

User avatar
RMcGirr83
Past Contributor
Past Contributor
Posts: 6243
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Site Style Sheet applied to attachment view

Postby RMcGirr83 » 13 Jul 2009, 18:45

I don't think that would be possible without heavily moding the code for the attachment, BUT what you could do is one of two things that I can think of off the top of my head.

1) Install the highslide attachment mod addon. It is installed on here and works really well. http://www.phpbb3bbcodes.com/viewtopic.php?f=39&t=1213 is where you can get the mod install instructions.
2) Have the attachment when clicked on open in a new tab so that it doesn't redirect away from the page where it was clicked on from.

Lyndka
New member
New member
Posts: 8
Joined: 06 Feb 2009, 20:54
Contact:

Re: Site Style Sheet applied to attachment view

Postby Lyndka » 13 Jul 2009, 20:52

Hmm - the page that the attachment displays in, is a basic one and the code that generates it is about 12 lines long (\phpBB3\download\file.php - about half way through) - I added a 'align=center' to the DIV line but as I say - am at a loss how to call styles.

User avatar
RMcGirr83
Past Contributor
Past Contributor
Posts: 6243
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Site Style Sheet applied to attachment view

Postby RMcGirr83 » 13 Jul 2009, 21:07


Lyndka
New member
New member
Posts: 8
Joined: 06 Feb 2009, 20:54
Contact:

Re: Site Style Sheet applied to attachment view

Postby Lyndka » 14 Jul 2009, 11:29

That's what I was looking at - but would like to use the 'Global' style sheet that phpBB uses - so if we change the style/look of our site I don't have to edit individual files.

User avatar
RMcGirr83
Past Contributor
Past Contributor
Posts: 6243
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Site Style Sheet applied to attachment view

Postby RMcGirr83 » 14 Jul 2009, 11:57

By "Global" does that include the links (eg, board index, etc.)?

Lyndka
New member
New member
Posts: 8
Joined: 06 Feb 2009, 20:54
Contact:

Re: Site Style Sheet applied to attachment view

Postby Lyndka » 14 Jul 2009, 19:44

yeah - we use a Guild Wars themed style set for our Forum - so it sets green backgrounds and so on - I just want to be able to set the displayed page background to match the site, use the IMG command to add a border using site border colours. If it can use the style sheet that the theme uses - if we move away from that set then the attachment display page will change too.

User avatar
RMcGirr83
Past Contributor
Past Contributor
Posts: 6243
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Site Style Sheet applied to attachment view

Postby RMcGirr83 » 14 Jul 2009, 19:51

Hmmmm, interesting. I'll take a look at the code and let you know one way or the other.


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “Modders MOD support”

Who is online

Users browsing this forum: Bing [Bot] and 53 guests