copy articles and structures (patch)
copy articles and structures (patch)
Hi
I increased the functions of copying
This allows to copy articles and structures in the front end.
Link: http://ww2.estg.ipleiria.pt/~fbatista/p ... hp?phpwcms
Regards
Fernando Batista
[UPDATE 21-11-2004 by Oliver]
http://www.phpwcms.de/forum/viewtopic.php?p=26692#26692
I increased the functions of copying
This allows to copy articles and structures in the front end.
Link: http://ww2.estg.ipleiria.pt/~fbatista/p ... hp?phpwcms
Regards
Fernando Batista
[UPDATE 21-11-2004 by Oliver]
http://www.phpwcms.de/forum/viewtopic.php?p=26692#26692
I also can't get the link working...
Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
- Oliver Georgi
- Site Admin
- Posts: 9913
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Great work - I have it implemented.
Here are some optimized buttons:
http://www.phpwcms.de/support/button.zip
...and there is a bug in act_structure.php (small mistake):
Oliver
Here are some optimized buttons:
http://www.phpwcms.de/support/button.zip
...and there is a bug in act_structure.php (small mistake):
Code: Select all
function copy_article_to_level($do, $dbcon) {
$sql = "SELECT * FROM ".DB_PREPEND."phpwcms_article WHERE article_deleted=0 AND article_id=".$do[1].";";
if($result = mysql_query($sql, $dbcon) or die("error while connecting to database: <br><pre>".$sql."</pre>")) {
if($row = mysql_fetch_assoc($result)) {
$row["article_cid"] = $do[2];
$row["article_created"] = time();
foreach($row as $key => $value) {
if($key == "article_id" ){
$keys = $key;
$values = "''";
}else{
$keys .= ", ".$key;
$values .= ", '".$value."'";
}
}
}
mysql_free_result($result);
$sql = "INSERT INTO ".DB_PREPEND."phpwcms_article (".$keys.") VALUES (".$values.");" ;
if($result = mysql_query($sql, $dbcon) or die("error while copy article <br>error while connecting to database: <br><pre>".$sql."</pre>")) {
$article_insert_id = mysql_insert_id($dbcon);
//a small bug ===============================================
//mysql_free_result($result);
//===========================================================
$sql1 = "SELECT * FROM ".DB_PREPEND."phpwcms_articlecontent WHERE acontent_aid=".$do[1].";";
if($result1 = mysql_query($sql1, $dbcon) or die("error sql")) {
while ($row1 = mysql_fetch_array($result1, MYSQL_ASSOC)) {
$row1["acontent_aid"] = $article_insert_id;
foreach($row1 as $key1 => $value1) {
if($key1 == "acontent_id" ){
$key1s = $key1;
$value1s = "''";
}else{
$key1s .= ", ".$key1;
$value1s .= ", '".$value1."'";
}
}
$sql2 = "INSERT INTO ".DB_PREPEND."phpwcms_articlecontent (".$key1s.") VALUES (".$value1s.");" ;
$result = mysql_query($sql2, $dbcon) or die("error while copy article content <br>error while connecting to database: <br><pre>".$sql2."</pre>");
}
mysql_free_result($result1);
}
}
}
}
hi oliver,
is this the code we could get when the link is working?
where to replace/add it?
is this the code we could get when the link is working?
where to replace/add it?
Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
- Oliver Georgi
- Site Admin
- Posts: 9913
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
OK - The original download link seems not to work anymore.
I have fixed some additional things in the MOD files. Here are all files again including new button images and patched language files.
http://prdownloads.sourceforge.net/phpw ... p?download
It's no MOD anymore - it's official
But!!! Backup database and older files before upgrading. Maybe there are bugs I haven't found.
Oliver
I have fixed some additional things in the MOD files. Here are all files again including new button images and patched language files.
http://prdownloads.sourceforge.net/phpw ... p?download
It's no MOD anymore - it's official

But!!! Backup database and older files before upgrading. Maybe there are bugs I haven't found.
Oliver
Great!
It works very fine and it's really useful to clone a section in order to, for istance, clone a section an make a new language section.
Great work fbatista
It works very fine and it's really useful to clone a section in order to, for istance, clone a section an make a new language section.
Great work fbatista

Campeones del mundo!
Vegetables!
Vegetables!
Fatal error:
Ich habe das Problem, dass ich in der Artikelstruktur folgende Fehlermeldung erhalte:
Fatal error: Call to undefined function: get_order_sort() in /xxx/xxxx/xx/xxxx/xxxxx/include/inc_lib/admin.functions.inc.php on line 77
In der Adminstruktur funktioniert alles einwandfrei. Hat jehmand eine Lösung.
Fatal error: Call to undefined function: get_order_sort() in /xxx/xxxx/xx/xxxx/xxxxx/include/inc_lib/admin.functions.inc.php on line 77
In der Adminstruktur funktioniert alles einwandfrei. Hat jehmand eine Lösung.
- Oliver Georgi
- Site Admin
- Posts: 9913
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Ich habe dieses Verhalten auch gesehen - und zwar wenn der Zend Optimizer in Version 2.1 genutzt wird. Ich konnte das Ergebnis reproduzieren und habe sofort mit Optimizer 2.5.5 (Apache/Windows) getestet - saubere Installation - alles in Ordnung.
Ich kann nur warnen - der Zend Optimizer bringt nichts, solange man keine encodierten PHP Scripte benutzt. Wenn PHP Beschleunigung dann nur Turck MMCache.
---
I have seen this too yesterday on a system running PHP in combination with Zend Optimizer 2.1. I can not recommend Zend Optimizer as long as you use encoded PHP scripts. For PHP acceleration use Turck MMCache only. I have tried using Zend Optimizer 2.5.5 on Windows - and it works. So if you need Optimizer - update to most current release of Zend Optimizer.
Oliver
Ich kann nur warnen - der Zend Optimizer bringt nichts, solange man keine encodierten PHP Scripte benutzt. Wenn PHP Beschleunigung dann nur Turck MMCache.
---
I have seen this too yesterday on a system running PHP in combination with Zend Optimizer 2.1. I can not recommend Zend Optimizer as long as you use encoded PHP scripts. For PHP acceleration use Turck MMCache only. I have tried using Zend Optimizer 2.5.5 on Windows - and it works. So if you need Optimizer - update to most current release of Zend Optimizer.
Oliver
hellonekket wrote:Das Kopieren von Artikeln und Strukturen klappt bei mir, aber nicht immer. Bei machen Strukturen mit viel Content bringt er eine Fehlermeldung:error while copy article content
error while connecting to database:.....
Jemand gleiche Probleme?
look at this!
http://www.phpwcms.de/forum/viewtopic.php?t=4524
- Oliver Georgi
- Site Admin
- Posts: 9913
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
OK,
I have patched the copy article/structure a very litte bit - now special chars are escaped before sent back to MySQL.
http://prdownloads.sourceforge.net/phpw ... p?download
Oliver
I have patched the copy article/structure a very litte bit - now special chars are escaped before sent back to MySQL.
http://prdownloads.sourceforge.net/phpw ... p?download
Oliver