Support Forums | Demo Gallery [1.x] [2.x] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
 Forum FAQForum FAQ   StatisticsStatistics   SearchSearch   UsergroupsUsergroups   FavoritesFavorites  

Special caracters
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Gallery 2 Integration View previous topicPrinter friendly versionView next topic
Author Message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA

PostPosted: Wed Aug 31, 2005 7:48 pm    Post subject: Re: Special caracters Reply with quote

actually, i'll add it to the integration package
Back to top
Offline View user's profile Send private message Visit poster's website
AdBot
   Post subject: Re: Special caracters  

Back to top
xPatryk

Beginner
Beginner


Joined: Oct 30, 2005
Posts: 11

PostPosted: Wed Nov 09, 2005 3:04 am    Post subject: Re: Special caracters Reply with quote

Hi,
there is any posibility to convert Gallery2 to ISO-8859-2 ?
I couldn't convert my php-nuke website, because it's too big,
and I couldn't switch it off for a few days...

Please, help me...
Patryk, Poland
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA

PostPosted: Wed Nov 09, 2005 3:44 pm    Post subject: Re: Special caracters Reply with quote

see your other post.
Back to top
Offline View user's profile Send private message Visit poster's website
anoopjohn

Beginner
Beginner


Joined: Mar 28, 2005
Posts: 10
Location: Hackensack, NJ

PostPosted: Mon Dec 12, 2005 10:21 pm    Post subject: Re: Special caracters Reply with quote

i have a gallery integrated with phpnuke. i have a work around for the utf-8 issue. the gallery module is running in single column layout - so no text from the phpnuke gets mangled. However when i included a the gallery imageblock in the site - some of the special characters in the pages started coming up funny. i did a simple workaround for this. thought i will share with all of you. I created a webservice for generating the image block and then in the image block code accessed the webservice
copy and save the following as block-Random_Image.php or whatever you want to name it and place inside blocks folder for the nuke.
Code: ›
<?php

/************************************************************************/
/* Random Image from Gallery 2                                          */
/* ===========================                                          */
/*                                                                      */
/* When you dont want to recreate the utf-8 converted nuke database     */
/* you can use this with the createthumb webservice to handle the thumb */
/* creation without funny characters appearing on your nuke page        */
/*                                                                      */
/* Author: Anoop John                                     */
/* http://www.zyxware.com                                               */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

if (eregi("block-Random_Image.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.html");
    die();
}

global $prefix, $db;

$url="http://<your_nuke_url>/<createthumb_filename.php>";
$cobj=curl_init($url);
curl_setopt($cobj,CURLOPT_RETURNTRANSFER,1);
$content=curl_exec($cobj);
curl_close($cobj);
?>

now copy the following and place it in a file named
<createthumb_filename.php>
Code: ›
<?php
/**
 * Gallery 2 webservice to create thumbnail without converting the nuke database
 * for handling the utf-8 issues.
 * @author Anoop John <http://www.zyxware.com>
 */

$blockType = "dailyImage";
$display = "none|date";

define("_G2_EMBED_PHP_FILE","embed.php");
define("_G2_CONFIGURATION_NOT_DONE","The module has not yet been configured.");

include("modules/gallery2/gallery2.cfg");

if ($g2configurationdone != "true") {
    $content = _G2_CONFIGURATION_NOT_DONE;
    return;
}

require_once($g2embedparams['embedphpfile']."/"._G2_EMBED_PHP_FILE);

$uid='admin';

$ret = GalleryEmbed::init(array(
    'embedPath' => $g2embedparams['embedPath'],
    'embedUri' => $g2embedparams['embedUri'],
    'relativeG2Path' => $g2embedparams['relativeG2Path'],
    'loginRedirect' => $g2embedparams['loginRedirect'],
    'activeUserId' => "$uid",
    'fullInit' => true));

$g2moddata = GalleryEmbed::handleRequest();
list($ret,$html, $head) = GalleryEmbed::getImageBlock(array('blocks'=>$blockType, 'show'=>$display,'itemFrame'=>'solid','albumFrame'=>'solid'));

if (!isset($g2moddata['isDone'])) {
  echo 'isDone is not defined, something very bad must have happened.';
  exit;
}

if ($g2moddata['isDone']) {
  exit;
}

$content = $head."\n<center>".$html."</center>";
echo $content;
?>

i am blindly setting the user as admin. perhaps there are security issues with this. dari perhaps you could extend this idea. anyway to reduce any security issues make sure you replace <createthumb_filename.php> with an obscure name and you should be pretty safe.

Cheers
Anoop
www.zyxware.com [zyxware.com]
Back to top
Offline View user's profile Send private message Visit poster's website
mk1200

Guru
Guru


Joined: Mar 01, 2006
Posts: 64

PostPosted: Wed Mar 08, 2006 8:47 pm    Post subject: Re: Special caracters Reply with quote

I gave Random_Image a shot, but I wasn't able to get any pics to show up in my block. Got any ideas?
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA

PostPosted: Thu Mar 09, 2006 7:46 am    Post subject: Re: Special caracters Reply with quote

um, how is this related to the original topic in this post? you might want ot try enabling the imageblock module in g2.
Back to top
Offline View user's profile Send private message Visit poster's website
mk1200

Guru
Guru


Joined: Mar 01, 2006
Posts: 64

PostPosted: Thu Mar 09, 2006 8:36 am    Post subject: Re: Special caracters Reply with quote

I was replying to anoopjohn. I tried his 2 php files from above, but wasn't able to pull a pic into the block.

When I use the G2 ImageBlock I get ??? marks in my forums. I use Gallery2 without any side blocks in PHPNuke, so the Gallery pages are fine and don't mangle any other code. I only have the issue when I put the G2 block on the site.
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA

PostPosted: Thu Mar 09, 2006 8:59 am    Post subject: Re: Special caracters Reply with quote

the ???? are a result of g2 using utf-8 and phpnuke using the outdated iso-1889
Back to top
Offline View user's profile Send private message Visit poster's website
cpoint

Beginner
Beginner


Joined: Apr 01, 2006
Posts: 1

PostPosted: Sun Apr 02, 2006 11:00 am    Post subject: Re: Special caracters Reply with quote

Hi, i'm a newbie ...

for the right charaters change this line in HEADER.PHP

$metastring = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset="_charset"\">\n";

TO:

$metastring = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n";

my phpnuke is 7.6 from EVO ... and this change give me the right characters.

CU all
CPOINT
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6287
Location: Washington Township, NJ, USA

PostPosted: Mon Apr 03, 2006 7:34 am    Post subject: Re: Special caracters Reply with quote

you may also need to change the database collation to utf-8 as well.
Back to top
Offline View user's profile Send private message Visit poster's website
alien

Beginner
Beginner


Joined: Mar 06, 2006
Posts: 2

PostPosted: Tue Jun 27, 2006 11:57 am    Post subject: Re: Special caracters Reply with quote

Hello,

for users having troubles yet consider checking httpd.conf file from Apache and add this line if it not exist:

AddCharset UTF-8 .utf8

Check too in this file if exist the line:

AddDefaultCharset on

and change to:

AddDefaultCharset off

I am converting my whole phpnuke ISO-8859-1 charset to UTF-8 reading HOWTO included in integration package and opening in ms notepad all lang-*.php language files and saving as... UTF-8 codification.

I hope it can help someone.

Can someone help me whith this [nukedgallery.net] issue?

Excuse my english
Back to top
Offline View user's profile Send private message
Fr4n-FX

Beginner
Beginner


Joined: Jul 31, 2006
Posts: 2
Location: España

PostPosted: Tue Aug 01, 2006 3:50 pm    Post subject: Re: Special caracters Reply with quote

in a last nuke version works for me changing header charset.

then i create a condicion in meta.php of includes folder

Code: › if ($module_name == "gallery2") {
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
} else {
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset="._CHARSET."\">\n";
}


and in header.php declare var as global $module_name:

function head() {

global $slogan, $module_name, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle;


sorry for my bad english Razz
Back to top
Offline View user's profile Send private message Visit poster's website MSN Messenger
azmiii

Beginner
Beginner


Joined: Jan 15, 2008
Posts: 4

PostPosted: Mon Oct 27, 2008 9:16 am    Post subject: Re: Special caracters Reply with quote

dari wrote: › try changing the encoding scheme at the top of:
nuke-root/language/lang-<yourlanguage>.php
You will need to change:
define("_CHARSET","ISO-8859-1");
to
define("_CHARSET","UTF-8");



thanks a lot Wink

türkçe karakter problemi olanlar bunu yapsa yeterli oluyor. bende şu an hatasız çalışıyor. 7.6+3.2 sistem
Back to top
Offline View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Gallery 2 Integration View previous topicPrinter friendly versionView next topic
Goto page Previous  1, 2, 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours

Powered by phpBB © phpBB Group



Sponsors: Dedicated ServersDomain NamesWeb HostingDomain Name RegistrationDedicated Web HostingWeb Design New YorkCompare VoIPseo packagesSEO CompanyNew York Yellow PagesFind LocationsVOIP Phone ServiceNeckermannBluetooth HeadsetOnline internetSEOchina factoryDressesRestaurant Locatorandroid tablet

8th year online! 2003-2011
Legal • Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion Works • SourceForge.net Logo • Theme by TonicMedia