Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 221
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 181
Total: 181

Author Topic: Code Tag Does Not Use Scrollbars In Gallery  (Read 2341 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: 16452
    • 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: 16452
    • 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
5410 Views
Last post April 02, 2008, 07:55:20 pm
by SMFHacks
0 Replies
3818 Views
Last post January 29, 2009, 06:15:54 am
by cepsi
2 Replies
6016 Views
Last post May 19, 2009, 10:01:04 pm
by william777
1 Replies
5241 Views
Last post July 26, 2009, 08:58:55 am
by SMFHacks
4 Replies
3653 Views
Last post August 11, 2017, 10:12:59 am
by ted245

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

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

Powered by EzPortal