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

Author Topic: Do global Custom Fields have specific IDs?  (Read 2032 times)

0 Members and 1 Guest are viewing this topic.

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Do global Custom Fields have specific IDs?
« on: October 24, 2014, 01:07:11 am »
For instance, in gallery image view, I want the argument

if($row4['value'] == 'specific global')
echo'Something';

Here's the code for custom fields.

Code: [Select]
// Check to show custom fields
if ($context['gallery_USER_ID_CAT'] == 0)
{

// Show Custom Fields
$result = db_query("
SELECT
f.title, d.value
FROM  ({$db_prefix}gallery_custom_field as f,{$db_prefix}gallery_custom_field_data as d)
WHERE d.ID_CUSTOM = f.ID_CUSTOM AND d.ID_PICTURE = " . $context['gallery_pic']['ID_PICTURE'] .  " ORDER BY f.roworder desc", __FILE__, __LINE__);
while ($row4 = mysql_fetch_assoc($result))
{
// No reason to show empty custom fields on the display page
if ($row4['value'] != '')
echo $row4['title'], ':&nbsp;',$row4['value'], '<br />';

}
mysql_free_result($result);
}
« Last Edit: October 24, 2014, 01:08:46 am by shuban »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16428
    • View Profile
Re: Do global Custom Fields have specific IDs?
« Reply #1 on: October 24, 2014, 08:19:47 am »
Global fields the ID_CAT variable is set to 0 which makes it global
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/

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
4779 Views
Last post March 28, 2008, 12:47:41 am
by usagi
2 Replies
4856 Views
Last post July 13, 2008, 01:26:06 pm
by CG Icon
8 Replies
10608 Views
Last post June 22, 2009, 03:37:07 pm
by Vincent Volmer
3 Replies
6653 Views
Last post November 17, 2008, 12:34:37 pm
by Rus
2 Replies
3780 Views
Last post January 23, 2013, 07:51:55 am
by amwebby

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