Forum

Please make sure that you have read the documentation and extensive resources provided on this site before posting your question!

Dynamic Content Gallery Resources

DCG Version 4.0 beta is now available for download and testing. This is a development version and not recommended for live sites. Read more here.

Note that the current stable release of the DCG is version 3.3.5.

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 3 characters - maximum search word length is 84 characters

Topic RSS
Code Fragment in the index.php
June 18, 2010
4:45 pm
jakob
Guest

Hey Folks!

DCG creates some weird code fragment in my index.php that leads to a validation error @ validator.w3.org

<?
/* Prevent direct access to this file */
if (!defined('ABSPATH')) {
	exit( __('Sorry, you are not allowed to access this file directly.', DFCG_DOMAIN) );
}
?>

How can I remove it?

Thanks!

Cheers,
Jakob
June 18, 2010
4:47 pm
jakob
Guest

ok! I managed it. Simply deleted the block from includesdfcg-gallery-jquery-styles.php

 

Cheers,
Jakob

June 20, 2010
3:56 pm
Ade
Admin
Forum Posts: 2490
Member Since:
August 25, 2008
Offline

Hi,

There's no normal reason why that code should appear in your page. I would reinstall the plugin.

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
June 21, 2010
10:41 am
jakob
Guest

Thanks for the hint!

 

I'll try to reinstall and let you know what the outcome is.

June 23, 2010
7:01 pm
Ade
Admin
Forum Posts: 2490
Member Since:
August 25, 2008
Offline

Ok!

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
November 18, 2011
5:23 am
ChillZZ
New Member
Forum Posts: 1
Member Since:
November 18, 2011
Offline

Hello. First of all i want to thank you for such a wonderful wordpress plugin. It's by far the best 'featured content' plugin i've seen. Second, i appologize for posting on such an old topic, but even after reading the config guide and FAQ i come to the conclusion, that it has not much to do with any of that.

<?
/* Prevent direct access to this file */
if (!defined('ABSPATH')) {
exit( __('Sorry, you are not allowed to access this file directly.', DFCG_DOMAIN) );
}
?>

The 'code fragment' does show up in a clean install of wordpress and DCG.Indeed, like the topic starter mentioned, it is in the includesdfcg-gallery-jquery-styles.php file. The problem can be solved in two ways :
1) Allow PHP Short Open Tags, or
2) change the <? to <?php on line 17 of the above mentioned file.
However, not every host have 'allow short open tags' for PHP enabled,
so good coding practice is always use the full <?php open tag.

Greetings ChillZZ

ps: same applies for dfcg-gallery-mootools-styles.php, line 17

November 18, 2011
7:46 am
Ade
Admin
Forum Posts: 2490
Member Since:
August 25, 2008
Offline

Thanks for posting. Yes, this is a known issue and has been discussed in some other threads some time ago. It's a typo in the code, so the best fix is your option number 2, ie change <? to <?php in the two files you mentioned. It has already been fixed in 4.0 beta.

Cheers!

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
Forum Timezone: UTC 1

Most Users Ever Online: 28

Currently Online: theonsale, nloronacele
12 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

johnbroome: 13

sjpeaches: 12

speedyp: 12

CherylMcL: 10

littlemerry: 8

lsnoei: 8

Member Stats:

Guest Posters: 770

Members: 1297

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 7

Topics: 978

Posts: 4293

Newest Members: chargers3, jwhetstone, robert, Mak-Donuts, kilerb, Marian Bamboi

Moderators:

Administrators: Ade (2490)