Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 201
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 182
Total: 182

Author Topic: Code Tag Does Not Use Scrollbars In Gallery  (Read 2327 times)

0 Members and 1 Guest are viewing this topic.

Offline Sockratease

  • Member
  • *
  • Posts: 14
    • View Profile
    • Fractal Forums
Code Tag Does Not Use Scrollbars In Gallery
« on: September 06, 2017, 04:32:25 am »
Hi.

Me again with another annoying question I hope you can help resolve.

As you may recall, our site is about Fractals - Art generated by Mathematical Formulas.

We often display the code used to generate our images, but it can involve numbers with many, many, decimal places.

The code tag is the obvious way to do that since it condenses that sort of thing in a box with scrollbars.

Here's an example of what we are getting when this is done:

https://fractalforums.org/gallery/?sa=view;id=29

The code box does not open scrollbars in the gallery, but does open them in the forum thread generated by the gallery  ( https://fractalforums.org/fractal-image-gallery/wiggly-fungus-spores-glitch/msg1141/#msg1141 ).  Without scrollbars in the code box, the page stretches out to be extremely wide.

This was not an issue on our old site, but that admin was good with php, and sadly I am not.

Do you have any advice on how we can correct this?
Life Is Complex - It Has Real And Imaginary Components

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Code Tag Does Not Use Scrollbars In Gallery
« Reply #1 on: September 06, 2017, 08:30:29 am »
Hmm I wonder if you have a mod that is changing it the default smf code doesn't seem to have that option.

A quick fix would be to modify

Sources/Subs.php

Find
Code: [Select]
'content' => '<div class="codeheader">' . $txt['code'] . ': ($2) <a href="#" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div>' . ($context['browser']['is_gecko'] || $context['browser']['is_opera'] ? '<pre style="margin: 0; padding: 0;">' : '') . '<code class="bbc_code">$1</code>' . ($context['browser']['is_gecko'] || $context['browser']['is_opera'] ? '</pre>' : ''),
Change to
Code: [Select]
'content' => '<div class="codeheader">' . $txt['code'] . ': ($2) <a href="#" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div>' . ($context['browser']['is_gecko'] || $context['browser']['is_opera'] ? '<pre style="margin: 0; padding: 0;">' : '') . '<code class="bbc_code" style="overflow: scroll;">$1</code>' . ($context['browser']['is_gecko'] || $context['browser']['is_opera'] ? '</pre>' : ''),
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Sockratease

  • Member
  • *
  • Posts: 14
    • View Profile
    • Fractal Forums
Re: Code Tag Does Not Use Scrollbars In Gallery
« Reply #2 on: September 06, 2017, 02:40:05 pm »
Hmm I wonder if you have a mod that is changing it the default smf code doesn't seem to have that option.

A quick fix would be to modify

Sources/Subs.php

Find
Code: [Select]
'content' => '<div class="codeheader">' . $txt['code'] . ': ($2) <a href="#" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div>' . ($context['browser']['is_gecko'] || $context['browser']['is_opera'] ? '<pre style="margin: 0; padding: 0;">' : '') . '<code class="bbc_code">$1</code>' . ($context['browser']['is_gecko'] || $context['browser']['is_opera'] ? '</pre>' : ''),
Change to
Code: [Select]
'content' => '<div class="codeheader">' . $txt['code'] . ': ($2) <a href="#" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div>' . ($context['browser']['is_gecko'] || $context['browser']['is_opera'] ? '<pre style="margin: 0; padding: 0;">' : '') . '<code class="bbc_code" style="overflow: scroll;">$1</code>' . ($context['browser']['is_gecko'] || $context['browser']['is_opera'] ? '</pre>' : ''),

Thanks, I'll try that!

We have limited the number of mods we install intentionally.  Probably only 5 to 10.  I can post the list if you like.

But did you notice that your own code box is not using scrollbars?  The page here is doing the same thing that happened in our gallery.

That is strange   :o
Life Is Complex - It Has Real And Imaginary Components

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Code Tag Does Not Use Scrollbars In Gallery
« Reply #3 on: September 06, 2017, 02:45:26 pm »
Yeah doesn't seem like it is built into SMF by default.

Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Sockratease

  • Member
  • *
  • Posts: 14
    • View Profile
    • Fractal Forums
Re: Code Tag Does Not Use Scrollbars In Gallery
« Reply #4 on: September 06, 2017, 02:55:16 pm »
That's a shame.

I just tried it, and no change   :'(

It is odd that the scrollbars do appear in the forum post generated by the gallery, but not in the gallery itself.  So it is in there by default someplace.  But it didn't work in your post, so ...  ????

Now I'm even more confused.

Especially since I had to increase the number of characters a post can have from 20,000 to 50,000 since a member complained that his 28,500 digit coordinates were above the character limit for a post   ::)

If I find an answer, or if the previous admin answers me when I ask again  (no reply from him about a few things) I will post here with the solution so you can know what did it.

Meanwhile, if you have any other ideas, I would love to try them!

Life Is Complex - It Has Real And Imaginary Components

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
5390 Views
Last post April 02, 2008, 07:55:20 pm
by SMFHacks
0 Replies
3813 Views
Last post January 29, 2009, 06:15:54 am
by cepsi
2 Replies
6004 Views
Last post May 19, 2009, 10:01:04 pm
by william777
1 Replies
5226 Views
Last post July 26, 2009, 08:58:55 am
by SMFHacks
4 Replies
3625 Views
Last post August 11, 2017, 10:12:59 am
by ted245

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal