Hi - a nice easy one for you!!!
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...
Site Style Sheet applied to attachment view
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
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
- RMcGirr83
- 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
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.
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.
Re: Site Style Sheet applied to attachment view
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.
Re: Site Style Sheet applied to attachment view
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.
- RMcGirr83
- 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
By "Global" does that include the links (eg, board index, etc.)?
Re: Site Style Sheet applied to attachment view
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.
- RMcGirr83
- 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
Hmmmm, interesting. I'll take a look at the code and let you know one way or the other.
Return to “Modders MOD support”
Who is online
Users browsing this forum: No registered users and 38 guests