Èíòåãðàöèÿ ãàëåðåè Coppermine â Wordpress Èíòåãðàöèÿ ãàëåðåè Coppermine â Wordpress
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Èíòåãðàöèÿ ãàëåðåè Coppermine â Wordpress

Started by RedPage, December 23, 2007, 02:19:44 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

RedPage

Îáíàðóæèë ÷òî åñëè ìîäèôèöèðîâàòü \include\functions.inc.php êàê îïèñàíî òóò http://lecactus.ru/2007/09/17/736
ãàëåðåÿ ïðåâðàùàåòñÿ â êðîêîçÿáðû. Ìîæíî ëè ýòî ïîïðàâèòü?

Makc666

Quote from: RedPage on December 23, 2007, 02:19:44 PM
Îáíàðóæèë ÷òî åñëè ìîäèôèöèðîâàòü \include\functions.inc.php êàê îïèñàíî òóò http://lecactus.ru/2007/09/17/736
ãàëåðåÿ ïðåâðàùàåòñÿ â êðîêîçÿáðû. Ìîæíî ëè ýòî ïîïðàâèòü?
Ïîòîìó ÷òî àâòîð ýòîé ñòàòüè ïëîõî ïèøåò ñòàòüè :)
Ó íåãî â ïðèìåðå êîäà îøèáêà.

Êîä äîëæåí áûòü:
function cpg_db_connect()   
{   
global $CONFIG;   
$result = @mysql_connect($CONFIG['dbserver'], $CONFIG['dbuser'], $CONFIG['dbpass']);   
if (!$result) {   
return false;   
}   
if (!mysql_select_db($CONFIG['dbname']))   
return false;   
mysql_query("SET NAMES 'utf8'",$result);
return $result;   
}


Ò.å. ñòðîêà:
<strong><font size="4">mysql_query("SET NAMES 'utf8'",$result);</font></strong>
äîëæíà áûòü:
mysql_query("SET NAMES 'utf8'",$result);

Êñòàòè, ó íåãî íà êàðòèíêå
http://lecactus.ru/wp-content/uploads/2007/09/coppermian.png
ýòî ÷åòêî âèäíî :)

+

Íå çàáûâàåì, ÷òî â ñòðîêå:
mysql_query("SET NAMES 'utf8'",$result);
äîëæíà áûòü óêàçàíà ïðàâèëüíàÿ êîäèðîâêà âàøåé áàçû äàííûõ, åñëè îíà ó Âàñ âäðóã íå 'utf8'.

RedPage

Quote from: RedPage on December 23, 2007, 02:19:44 PM
Îáíàðóæèë ÷òî åñëè ìîäèôèöèðîâàòü \include\functions.inc.php êàê îïèñàíî òóò http://lecactus.ru/2007/09/17/736
ãàëåðåÿ ïðåâðàùàåòñÿ â êðîêîçÿáðû. Ìîæíî ëè ýòî ïîïðàâèòü?


Ïðîñòî ñíåñ áàçó. Âîò è âñÿ ìîäåðíèçàöèÿ.

Makc666

Quote from: RedPage on December 25, 2007, 03:45:00 PM
Ïðîñòî ñíåñ áàçó. Âîò è âñÿ ìîäåðíèçàöèÿ.
ß (ìû) àáñîëþòíî íå ïîíÿëè äàííûé âàø êîììåíòàðèé.

RedPage

Quote from: Makc666 on December 26, 2007, 01:36:40 PM
ß (ìû) àáñîëþòíî íå ïîíÿëè äàííûé âàø êîììåíòàðèé.

À òàê è ïîíèìàòü åñëè Âàì ïîâåçëî, è Âû âîâðåìÿ íå îáíàðóæèëè, ÷òî â Âàøó áàçó íåïðàâèëüíî çàïèñûâàþòñÿ äàííûå òî ïûòàòüñÿ èõ ïîòîì ñïàñòè áåññìûñëåííî. Âñåõ ïðè÷èí òóò ïåðå÷èñëÿòü íå áóäó ñêàæó ÷òî ó ìåíÿ çà ãîä îäèí ôàéëèê ïîòÿíóë íà 17 ìåòðîâ è ïûòàåòñÿ åãî êîíâåðòíóòü â ïðàâèëüíûé ôîðìàò ðàâíîñèëüíî áåçáîëåçíåííîìó ïðûæêó ñ íåáîñêðåáà. Êðÿêîçÿáðû ïèøóòñÿ â áàçó äàæå â íîâîé âåðñèè ýòî íå èñïðàâëåíî.

Alex Revo

ß è 50-òè ìåòðîâóþ áàçó êîíâåðòèðîâàë è íè÷åãî...

RedPage

Quote from: Alex Revo on December 28, 2007, 04:45:10 AM
ß è 50-òè ìåòðîâóþ áàçó êîíâåðòèðîâàë è íè÷åãî...

Æàëêî ÿ óæå âñå óäàëèë :(
Õîòÿ ìåíÿ áîëüøå ðàññòðîèëî, ÷òî äàæå â íîâîé âåðñèè ãàëåðåè ãëþêè âñå òåæå.

È êàê Âû êîíâåðòèðîâàëè 50-òè ìåòðîâóþ áàçó äóìàþ íåêîòîðûì áóäåò èíòåðåñíî ðàññêàæèòå.
Åñëè Âû êîíå÷íî íå ñîáèðàåòåñü ýòî äåëàòü çà äåíüãè êàê íà http://mywordpress.ru/

Makc666

Quote from: RedPage on December 28, 2007, 11:57:08 AM
Õîòÿ ìåíÿ áîëüøå ðàññòðîèëî, ÷òî äàæå â íîâîé âåðñèè ãàëåðåè ãëþêè âñå òåæå.
Íåò íèêàêèõ ãëþêîâ â ãàëåðåè, ñâÿçàííûõ ñ êîäèðîâêîé.

Quote from: RedPage on December 28, 2007, 11:57:08 AM
È êàê Âû êîíâåðòèðîâàëè 50-òè ìåòðîâóþ áàçó äóìàþ íåêîòîðûì áóäåò èíòåðåñíî ðàññêàæèòå.
Åñëè Âû êîíå÷íî íå ñîáèðàåòåñü ýòî äåëàòü çà äåíüãè êàê íà http://mywordpress.ru/
Êîíâåðòàöèÿ áàçû çàâèñèò îò òîãî, ÷òî ó Âàñ èç èíñòðóìåíòîâ óïðàâëåíèÿ åñòü íà ñåðâåðå.
Åñëè åñòü òîëüêî phpMyAdmin, òî ýòî îäèí ïîäõîä.
Åñëè åñòü äîñòóï ê øåëó, òî ýòî äðóãîé ïîäõîä.

Òàê æå çàâèñèò îò òîãî, â êàêîì êîíêðåòíîì ñîñòîÿíèè, â ò.÷. è êîäèðîâêå, ó Âàñ áûëà áàçà äàííûõ.

RedPage

Quote from: Makc666 on December 28, 2007, 12:03:02 PM
Íåò íèêàêèõ ãëþêîâ â ãàëåðåè, ñâÿçàííûõ ñ êîäèðîâêîé.
Êîíâåðòàöèÿ áàçû çàâèñèò îò òîãî, ÷òî ó Âàñ èç èíñòðóìåíòîâ óïðàâëåíèÿ åñòü íà ñåðâåðå.
Åñëè åñòü òîëüêî phpMyAdmin, òî ýòî îäèí ïîäõîä.
Åñëè åñòü äîñòóï ê øåëó, òî ýòî äðóãîé ïîäõîä.

Òàê æå çàâèñèò îò òîãî, â êàêîì êîíêðåòíîì ñîñòîÿíèè, â ò.÷. è êîäèðîâêå, ó Âàñ áûëà áàçà äàííûõ.

Ñîðèòñÿ èç çà 17 ìåòðîâîãî ôàéëà áàçû ÿ òóò íå ñîáèðàþñü, ïîäóìàåøü íå íàøåë äîñòàòî÷íî ëîêàëèçîâàííîé è ïîíÿòíîé èíôîðìàöèè íà ñàéòå ðàçðàáîò÷èêà ýòî ëèøü ãîâîðèò î ðàñïðîñòðàíåííîñòè è ïîïóëÿðíîñòè äàííîãî ïðîäóêòà. Âûòÿãèâàòü ïîëåçíóþ èíôîðìàöèþ èç ìîäåðàòîðà êëåùàìè, ñ÷èòàþ íåýòè÷íî, òåì áîëåå ÷òî ÿ ðåøèë ïðîáëåìó.

Makc666

Quote from: RedPage on December 28, 2007, 12:22:51 PM
Ñîðèòñÿ èç çà 17 ìåòðîâîãî ôàéëà áàçû ÿ òóò íå ñîáèðàþñü, ïîäóìàåøü íå íàøåë äîñòàòî÷íî ëîêàëèçîâàííîé è ïîíÿòíîé èíôîðìàöèè íà ñàéòå ðàçðàáîò÷èêà ýòî ëèøü ãîâîðèò î ðàñïðîñòðàíåííîñòè è ïîïóëÿðíîñòè äàííîãî ïðîäóêòà. Âûòÿãèâàòü ïîëåçíóþ èíôîðìàöèþ èç ìîäåðàòîðà êëåùàìè, ñ÷èòàþ íåýòè÷íî, òåì áîëåå ÷òî ÿ ðåøèë ïðîáëåìó.
Ñîãëàñåí, ÷òî ñîðèòüñÿ íå íóæíî.
Äà è ÿ ãäå-òî òîæå áûë íå ñîâñåì ïðàâ, êîãäà ãîâîðèë âûøå, ÷òî "Íåò íèêàêèõ ãëþêîâ â ãàëåðåè, ñâÿçàííûõ ñ êîäèðîâêîé.".
Êîíå÷íî îíè åñòü è êàê ÿ óæå ãîâîðèë â äðóãîé òåìå, îò íèõ íóæíî óõîäèòü.

Makc666

Quote from: Makc666 on December 28, 2007, 12:03:02 PM
Íåò íèêàêèõ ãëþêîâ â ãàëåðåè, ñâÿçàííûõ ñ êîäèðîâêîé.
ß íàïèñàë ïî äàííîìó âîïðîñó Tutorial:
http://forum.coppermine-gallery.net/index.php?topic=49624.0