Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 12058
Latest: UCAPhantom
New This Month: 6
New This Week: 2
New Today: 0
Stats
Total Posts: 38553
Total Topics: 6794
Most Online Today: 186
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 51
Total: 52

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

0 Members and 1 Guest are viewing this topic.

Offline Sockratease

  • Newbie
  • *
  • 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: 14317
    • 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! Also contests/promotions for verified sites.

Offline Sockratease

  • Newbie
  • *
  • 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: 14317
    • 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! Also contests/promotions for verified sites.

Offline Sockratease

  • Newbie
  • *
  • 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
3299 Views
Last post April 02, 2008, 07:55:20 pm
by SMFHacks
0 Replies
2051 Views
Last post January 29, 2009, 06:15:54 am
by cepsi
2 Replies
3880 Views
Last post May 19, 2009, 10:01:04 pm
by william777
1 Replies
3059 Views
Last post July 26, 2009, 08:58:55 am
by SMFHacks
4 Replies
521 Views
Last post August 11, 2017, 10:12:59 am
by ted245

+- Recent Topics

database error by SMFHacks
Today at 08:22:17 pm

SMF Status Update by Raziba
Today at 07:32:02 pm

SMF Gallery Pro 8.0 Released! by SMFHacks
Today at 06:50:01 pm

Just Paid for Pro...now what do I do? by SMFHacks
February 15, 2018, 03:19:20 pm

Search Feature by shuban
February 14, 2018, 02:23:03 pm

Credits from Referrals? by SMFHacks
February 13, 2018, 09:14:56 am

Uploading Video by TKO-100
February 13, 2018, 05:59:33 am

Pretty URLs issue by juliereader
February 10, 2018, 05:52:48 am

smf4mobile ad mod request by SMFHacks
February 08, 2018, 06:37:23 pm

Shopping Cart Email by TKO-100
February 05, 2018, 05:48:10 am

Powered by EzPortal