You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 57 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Changing Title of Block: Module does not take affect [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Agrivated
Nuke Soldier
Nuke Soldier


Joined: Mar 24, 2006
Posts: 10


PostPosted: Thu Mar 23, 2006 10:56 pm Reply with quoteBack to top

Every time i try to change the title of a block, it does not take affect.

using MySQL 5.0.19, Abyss Web Server x1 and PHP-NUKE 7.8
Find all posts by AgrivatedView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12403


PostPosted: Fri Mar 24, 2006 6:54 am Reply with quoteBack to top

Using the latest Patched 3.2 files?

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
Agrivated
Nuke Soldier
Nuke Soldier


Joined: Mar 24, 2006
Posts: 10


PostPosted: Fri Mar 24, 2006 7:07 am Reply with quoteBack to top

patch for what, php-nuke, and where do i get it?
Find all posts by AgrivatedView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12403


PostPosted: Fri Mar 24, 2006 7:08 am Reply with quoteBack to top

To fix many security issues and bugs in phpNuke - see http://www.nukeresources.com

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
Agrivated
Nuke Soldier
Nuke Soldier


Joined: Mar 24, 2006
Posts: 10


PostPosted: Fri Mar 24, 2006 8:36 am Reply with quoteBack to top

i didn't see any 3.2 patch but i did update using the 7.9 patch (running the update.php file) which is the actual version of php-nuke that i was using(not 7.8). That did not fix the problem though.
Find all posts by AgrivatedView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12403


PostPosted: Fri Mar 24, 2006 8:43 pm Reply with quoteBack to top

Why would you use the Patched not designed for your version?

Does this happen on one block or all of them?

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
Agrivated
Nuke Soldier
Nuke Soldier


Joined: Mar 24, 2006
Posts: 10


PostPosted: Fri Mar 24, 2006 9:54 pm Reply with quoteBack to top

i was using 7.9 not 7.8 and i downloaded the 7.9 patch.

yes it happens to all blocks. I can create blocks just fine but, when i try to edit the title, after creation, the change does not take affect either.
Find all posts by AgrivatedView user's profileSend private message
rafaelgm
Nuke Cadet
Nuke Cadet


Joined: Apr 10, 2006
Posts: 4


PostPosted: Mon Apr 10, 2006 11:31 pm Reply with quoteBack to top

Hi,

I figured out what the problem is while doing a few tests. The problem is that the value of the "refresh" field (integer) of "nuke_blocks" table is wrong in the SQL update command. I know nothing about PHP, but I will see if I can study it a little and try to discover the real cause of the problem. A temporary "ugly" fix would be editing this file:

..\htdocs\phpnuke\html\admin\modules\blocks.php

Look for the line that begins with:

$result8 = $db->sql_query

Before that line, add this, so it will look like:

$refresh = intval($refresh);
$result8 = $db->sql_query


It's crazy, I know! I was debugging it and If I put "echo $refresh", nothing appears, but if I put "echo intval($refresh);" the value appears! Hahaha, PHP is crazy! If someone can figure this out it would be very nice.

Please, excuse my english.


Last edited by rafaelgm on Wed Apr 12, 2006 4:09 pm; edited 2 times in total
Find all posts by rafaelgmView user's profileSend private message
rafaelgm
Nuke Cadet
Nuke Cadet


Joined: Apr 10, 2006
Posts: 4


PostPosted: Tue Apr 11, 2006 5:10 pm Reply with quoteBack to top

Hi again,

I'm sorry, my solution was very ugly! It just "bypassed" the problem!

The problem lies in function BlocksEdit in this section of the [...]/html/admin/modules/blocks.php file:
Code:
...
      ."<option name=\"action\" value=\"r\" $selact2>"._DELETE."</option></select></td></tr>";
      if ($url != "") {
         $sel1 = $sel2 = $sel3 = $sel4 = $sel5 = "";
         if ($refresh == 1800) {
            $sel1 = "selected";
         } elseif ($refresh == 3600) {
            $sel2 = "selected";
         } elseif ($refresh == 18000) {
            $sel3 = "selected";
         } elseif ($refresh == 36000) {
            $sel4 = "selected";
         } elseif ($refresh == 86400) {
            $sel5 = "selected";
         }
         echo "<tr><td>"._REFRESHTIME.":</td><td><select name=\"refresh\"><option name=\"refresh\" value=\"1800\" $sel1>1/2 "._HOUR."</option>"
         ."<option name=\"refresh\" value=\"3600\" $sel2>1 "._HOUR."</option>"
         ."<option name=\"refresh\" value=\"18000\" $sel3>5 "._HOURS."</option>"
         ."<option name=\"refresh\" value=\"36000\" $sel4>10 "._HOURS."</option>"
         ."<option name=\"refresh\" value=\"86400\" $sel5>24 "._HOURS."</option></select>&nbsp;<font class=\"tiny\">"._ONLYHEADLINES."</font>";
      }
...


That if does not have an else. I mean, if the url variable is empty, the value of the refresh value is not being converted to HTML code. And when the BlocksEditSave function is called, this value is empty.

The solution is to add an else to the if, passing the refresh value as an "hidden input type" to the HTML code, like this:

Code:
...
      if ($url != "") {
                        ...
      }
      else
         echo "<input type=\"hidden\" name=\"refresh\" value=\"$refresh\">";
...


But maybe this value is not useful at all if the url variable is empty. Then, it could be set to 0. But as I don't know that, I just leave the value the way it is.
Find all posts by rafaelgmView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12403


PostPosted: Tue Apr 11, 2006 6:10 pm Reply with quoteBack to top

It is only used for RSS feed, so I think you should be safe setting it blank or 0.

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
rafaelgm
Nuke Cadet
Nuke Cadet


Joined: Apr 10, 2006
Posts: 4


PostPosted: Wed Apr 12, 2006 4:13 pm Reply with quoteBack to top

Evaders99 wrote:
It is only used for RSS feed, so I think you should be safe setting it blank or 0.

Thanks for the reply. Yeah, if the value is only used for that, it is safe to set it to 0. I think it has to be zero because the table field is an integer. And that was the original problem: the field was blank, so PHP converted it to an empty string ('') and tried to insert that value into the database.
Find all posts by rafaelgmView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.225 Seconds - 275 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::