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: 241
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 222
Total: 222

Author Topic: Gallery block spitting out errors.  (Read 6220 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: 16452
    • 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: 16452
    • 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: 16452
    • 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
15523 Views
Last post December 02, 2008, 04:33:54 pm
by Ken.
4 Replies
14746 Views
Last post December 04, 2007, 09:27:54 pm
by SMFHacks
5 Replies
7038 Views
Last post May 13, 2008, 10:37:29 am
by Apex
0 Replies
3718 Views
Last post September 04, 2008, 10:27:18 pm
by Baked_Bruce
4 Replies
6143 Views
Last post June 18, 2010, 09:18:00 am
by dvera

+- 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