Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4253
Latest: Ineedsmfhelp
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43242
Total Topics: 7516
Most Online Today: 92
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 93
Total: 93

Author Topic: Gallery block spitting out errors.  (Read 6203 times)

0 Members and 1 Guest are viewing this topic.

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Gallery block spitting out errors.
« on: October 17, 2014, 07:41:23 am »
I keep getting this error when an image, marked as mature pops up:

Call to undefined function CanViewMature() in /home/***/public_html/Themes/default/TPsubs.template.php(48) : eval()'d code on line 175

The code related to it is:

Code: [Select]
if ($row['mature'] == 1)
{
if (CanViewMature() == false)
$row['thumbfilename'] = 'mature.png';
}

Any thoughts on how to correct it?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16428
    • View Profile
Re: Gallery block spitting out errors.
« Reply #1 on: October 17, 2014, 08:03:49 am »
Add to top of block

global $sourcedir;
require_once($sourcedir . '/Gallery.php');
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 shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Gallery block spitting out errors.
« Reply #2 on: October 18, 2014, 01:50:37 am »
Add to top of block

global $sourcedir;
require_once($sourcedir . '/Gallery.php');

By adding this, will it affect performance? Gallery.php is big file for such a small function. In addition, I'm finding that keywords are including comas. Here's an example: http://biology-forums.com/index.php?action=gallery;sa=view;id=19183

The keywords I used were exactly: house, dance, melo

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16428
    • View Profile
Re: Gallery block spitting out errors.
« Reply #3 on: October 18, 2014, 09:34:08 am »
Shouldn't hurt that much at all for performance it is require once. If not you can rip out the functions out of the gallery.php file
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 shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Gallery block spitting out errors.
« Reply #4 on: October 18, 2014, 12:37:57 pm »
Any word on the comma issue?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16428
    • View Profile
Re: Gallery block spitting out errors.
« Reply #5 on: October 18, 2014, 12:39:57 pm »
Haven't looked into it yet.
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 shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: Gallery block spitting out errors.
« Reply #6 on: October 18, 2014, 12:55:28 pm »
Haven't looked into it yet.

Just as long as it's noted, thanks

 

Related Topics

  Subject / Started by Replies Last post
11 Replies
15484 Views
Last post December 02, 2008, 04:33:54 pm
by Ken.
4 Replies
14650 Views
Last post December 04, 2007, 09:27:54 pm
by SMFHacks
5 Replies
6997 Views
Last post May 13, 2008, 10:37:29 am
by Apex
0 Replies
3708 Views
Last post September 04, 2008, 10:27:18 pm
by Baked_Bruce
4 Replies
6051 Views
Last post June 18, 2010, 09:18:00 am
by dvera

+- Recent Topics

is it possible to add support for odysee.com by SMFHacks
March 13, 2024, 10:53:28 pm

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

User Gallery Feature: move / bulk move images by SMFHacks
January 30, 2024, 05:48:25 pm

In the future it may be for smf 2.1.x? by smithloo
January 30, 2024, 12:55:34 am

Powered by EzPortal