Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.00.00 - v2.02.00 Distro
Author Message
deadl0ck
Hangin' Around



Joined: Apr 09, 2006
Posts: 44

PostPosted: Mon Apr 17, 2006 5:38 am Reply with quote

Hi all,
I would like to create a new block on the right of my site to display some info. I have used this feature many times back when I had 7.3 phpNuke, but it doesn't seem to be working now.

I create the block - Name "Test" and Text "Test" - And click the "Create Block" Button - I get brought back to the Block Admin page, but the block is not created.

I have tried to create a block to a module (such as surveys) and it doesn't get created either....

BTW, I am logged as the God account.

Any ideas ?
 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6432

PostPosted: Mon Apr 17, 2006 6:15 am Reply with quote

There could be a difference between not adding the record the blocks table and not displaying it, and the difference will help determine what the problem is.

Can you see the new block in the blocks administration? If not, the problem could either be with the blocks administration code or with the blocks table, or both. If so, the problem could be with the theme, with the main index.php file, and / or with the module index.php files...

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Mon Apr 17, 2006 6:15 am Reply with quote

can you be more specific ?
are you trying to create a block with ONLY text or does it contains html or java script ?
 
View user's profile Send private message
deadl0ck







PostPosted: Mon Apr 17, 2006 2:39 pm Reply with quote

Quote:
Can you see the new block in the blocks administration?

No. It's not there at all, so it's not creating the record in the DB.

Quote:
f not, the problem could either be with the blocks administration code or with the blocks table, or both

I have no customized code - just the Raven Distro built on a vanilla 7.6 nuke install

Quote:
can you be more specific ?
are you trying to create a block with ONLY text or does it contains html or java script ?

I tried Only text, and I tried creating a block from a Module.
Both do not work. No HTML or JS or any funky stuff.
After I click "Create Block", it submits the page and then the Block admin page reloads, but the block has not been created.
I check the DB with phpMyAdmin and it's nopt created.
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Apr 17, 2006 6:43 pm Reply with quote

Raven's files on 7.6's original database won't work. Use phpMyAdmin and post the structure of your blocks table

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Mon Apr 17, 2006 8:24 pm Reply with quote

If I am not mistaken you need to create a block-whatever_it_is.php file in your blocks directory before you can administer anything. I believe that the Karakas howto guide covers some of how to do this. I recall seeing some logic that basically reads in all the file names that are in the blocks directory and then treats each distinct name as a block. It is at that point that block administration kicks in.

The documentation is here:

http://www.karakas-online.de/EN-Book/
 
View user's profile Send private message Visit poster's website
kguske







PostPosted: Mon Apr 17, 2006 8:50 pm Reply with quote

You can create blocks with HTML or RSS, without having a file in the blocks directory. Since he tried to create a text block (via the HTML block function), it seems there is a problem with the blocks table, which is why evaders99 wants to see the structure of that table.
 
deadl0ck







PostPosted: Tue Apr 18, 2006 3:27 am Reply with quote

Blocks Table is as follows:

Code:


Field         Type     
=====         =====
bid           int(10)
bkey          varchar(15)
title         varchar(60)
content       text
url           varchar(200)
bposition     char(1)
weight        int(10)
active        int(1)
refresh       int(10)
time          varchar(14)
language      varchar(30)
blockfile     varchar(255)
view          int(1)
groups        text
expire        varchar(14)
action        char(1)
subscription  int(1)
 
fkelly







PostPosted: Tue Apr 18, 2006 7:22 am Reply with quote

I stand corrected Kguske. I just confirmed it too by creating a test block on my Ravennuke 2.02 test site. Worked like a charm. Just called the block test and put the text "test" into it (using your Wyswig editor I might add) and hit create block and it created it like a charm.

The database structure for a "pure" RN site corresponds exactly to what deadlock posted for his site. The code for creating a block from blocks.php is:

Code:
   $db->sql_query("insert into ".$prefix."_blocks values (NULL, '$bkey', '$title', '$content', '$url', '$bposition', '$weight', '$active', '$refresh', '$btime', '$blanguage', '$blockfile', '$view', '$ingroups', '$expire', '$action', '$subscription')");


There are 17 fields both in what deadlock posted, in what shows on a structure listing for RN2.02 and in this SQL statement. Unless someone sees an obvious solution here maybe the next step would be to put some echoes into the code just before that SQL statement is executed and to check for and echo back any SQL errors on a test version of the system. Or check the logs and see if any errors show there?
 
deadl0ck







PostPosted: Tue Apr 18, 2006 8:40 am Reply with quote

If I set the error reporting to true in config.php, where do I see the errors (if any) ?

Is it direct on the web page ? Or is it somewhere in a log file ?

Actually, fkelly, where is the code:
Code:
 $db->sql_query("insert into ".$prefix."_blocks values (NULL, '$bkey', '$title', '$content', '$url', '$bposition', '$weight', '$active', '$refresh', '$btime', '$blanguage', '$blockfile', '$view', '$ingroups', '$expire', '$action', '$subscription')");

Contained ?
I can't seem to find it....
I'll keep looking in the meantime though.
 
deadl0ck







PostPosted: Tue Apr 18, 2006 9:08 am Reply with quote

Never Mind - I "fixed" it

Bloody theme I uploaded (the only non-packaged theme I have) had it's own blocks.php that overwrote mine !!

So - problem fixed.

Thanks guys for pointint me in the right direction !!
 
jnorris
New Member
New Member



Joined: Dec 16, 2005
Posts: 7

PostPosted: Mon May 15, 2006 9:08 pm Reply with quote

Quote:
Never Mind - I "fixed" it

Bloody theme I uploaded (the only non-packaged theme I have) had it's own blocks.php that overwrote mine !!

So - problem fixed.

Thanks guys for pointint me in the right direction !!


I am having the same problem, don't understand the theme having a block.php. Anyway, If I try to create a block it is created. However, the links all go back to the admin Panel. When I try to edit it all the info I put in is gone. Everything was working fine and I upgraded my site and woolah no more html blocks. Really don't like to put version numbers in posts.
 
View user's profile Send private message Visit poster's website
fkelly







PostPosted: Tue May 16, 2006 7:15 am Reply with quote

If you are using a theme that replaces the standard blocks.php file perhaps the question should be directed to whoever wrote the theme. It's hard for me to even conceive why a themes author would need to overlay the standard blocks.php file and I'd suggest you just get rid of that theme and restore the standard file. Then people here would have some basis to help without trying to debug a faulty theme.
 
jnorris







PostPosted: Tue May 16, 2006 5:43 pm Reply with quote

I am using fisubice
 
fkelly







PostPosted: Tue May 16, 2006 6:22 pm Reply with quote

To reply to Deadlock, the code I referenced is contained in your /html/admin/modules/blocks.php file in the function called BlocksAdd.

If somehow yours (blocks.php) got replaced then that is probably the source of your problem. But that's where blocks get added.

To Jnorris, if you are using fisubice and never uploaded the same theme that deadlock did or any other that replaced blocks.php then we have a different problem. Maybe you could explain a little more about what you did in terms of the upgrade process. What distribution? Did you replace your tables entirely or did you change the structure and import the data? Did you overwrite the old PHP programs with RN 2.02.02 or did you copy the RN files into an empty structure?
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed May 17, 2006 6:05 am Reply with quote

jnorris, if you are using an unmodified version of RavenNuke76 2.x, then you probably had an FTP problem and need to re-FTP your files. Raven suggests using Binary mode on your transfer.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
jnorris







PostPosted: Wed May 17, 2006 5:37 pm Reply with quote

O.k. I did not over write my original blocks.php.. version 7.6 chatserv patched 3.2 .. When I upgraded, I copied the old database then updated as recommended by phpnuke(v7.2-7.3-*.* and so fourth). The problem is the same with all templates, I have even reuploaded and done live updates to the blocks.php. Sorry for the long post.

I am stumped

If I put this in the block In the admin panel....
Code:
<table width="100%" cellpadding="2" cellspacing="0" border="0" class="forumline">

         
          <tr>
           
    <td class="row1" align="left"><a href="http://lanparty.com">Lan
      Party.com </a></td>
          </tr>
         
    <td class="row1" align="left"><a href="http://lanlocator.com">Lan
      Locator.com </a></td>
          </tr>
       
    <td class="row1" align="left"><a href="http://www.lanxtreme.net/">LAN
      Extreme </a></td>
          </tr>

         
    <td class="row1" align="left"><a href="http://www.LANmaniac.com">LANsomniac</a></td>
          </tr>
                   
    <td class="row1" align="left"><a href="http://starcitylan.com">StarcityLAN</a></td>
          </tr>
         
    <td class="row1" align="left"><a href="http://omgn.com">OMGN</a></td>
          </tr>
        </table>


THis is the source from that block on my page......
Code:
<table width="170" border="0" cellspacing="0" cellpadding="7">

  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="1">
        <tr>

          <td bgcolor="#486386"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
              <tr>
                <td height="27" style="background-image: url(themes/fisubice/images/cellpic3.gif)"><table width="100%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td><font class="block-title"><strong>test</strong></font></td>
                    </tr>
                  </table></td>
              </tr>

              <tr>
                <td bgcolor="#F4F6FB"><table width="100%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td><table width="100%" cellpadding="2" cellspacing="
 
fkelly







PostPosted: Wed May 17, 2006 8:51 pm Reply with quote

I'm just trying to understand at this point. I had to reread this a few times but what I think you are saying is that you are going into blocks administration on the admin panel and in the content field you are entering what is on the first quoted "block" in your post? And the result is what you are getting in the second quoted block.

And if I'm not mistaken when you enter something in the first block (the content area) on the admin panel for blocks, to add a new block, you are using the FCKeditor? I think so but please confirm. If so, maybe someone else here has an answer but I've had a lot of weirdness on my sites with that editor too and I can't rule out that it would so something like that. I'll try to simulate what you entered on a test site tomorrow and report back unless someone else jumps in first or you tell me that I'm not interpreting your correctly.
 
montego







PostPosted: Fri May 19, 2006 6:19 am Reply with quote

Quote:

O.k. I did not over write my original blocks.php.. version 7.6 chatserv patched 3.2 .. When I upgraded, I copied the old database then updated as recommended by phpnuke(v7.2-7.3-*.* and so fourth).


Ok, I think you said the "magic words", although I am still a bit confused with your results. RavenNuke76 2.x comes with NSN Groups installed. Since you upgraded from another nuke database, you might be missing some fields and data. Please post your table schema for the nuke_blocks table here so we can find out for sure.
 
jnorris







PostPosted: Fri May 19, 2006 9:51 pm Reply with quote

First of all thank you guys for trying to help me with this issue. Here is my nuke_blocks table.

Code:


 `bid` int(10) NOT NULL auto_increment,
  `bkey` varchar(15) NOT NULL default '',
  `title` varchar(60) NOT NULL default '',
  `content` text NOT NULL,
  `url` varchar(200) NOT NULL default '',
  `bposition` char(1) NOT NULL default '',
  `weight` int(10) NOT NULL default '1',
  `active` int(1) NOT NULL default '1',
  `refresh` int(10) NOT NULL default '0',
  `time` varchar(14) NOT NULL default '0',
  `blanguage` varchar(30) NOT NULL default '',
  `blockfile` varchar(255) NOT NULL default '',
  `view` int(1) NOT NULL default '0',
  `expire` varchar(14) NOT NULL default '0',
  `action` char(1) NOT NULL default '',
  `subscription` int(1) NOT NULL default '0',
  PRIMARY KEY  (`bid`),
  KEY `bid` (`bid`),
  KEY `title` (`title`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=76 ;

I should not have put that theme reference in my first post. I have only used the themes that do not require my original blocks.php to be modified.
By cahnce is this it?
Quote:
Warning PRIMARY and INDEX keys should not both be set for column `bid`
 
montego







PostPosted: Sat May 20, 2006 12:15 am Reply with quote

No, it is as I expected. Your database does not have the NSN Groups fields. Take a good backup of your database and then run Raven's 2.02.02 installSQL.php script BUT ONLY EXECUTE STEP 2 which says "NSN Groups"!!!!

I think that should fix you up.
 
jnorris







PostPosted: Sat May 20, 2006 1:14 pm Reply with quote

i tried it still have the same problem
Code:
-- --------------------------------------------------------


--
-- Table structure for table `nuke_nsngr_config`
--

DROP TABLE IF EXISTS `nuke_nsngr_config`;
CREATE TABLE `nuke_nsngr_config` ( `config_name` varchar(255) NOT NULL default '', `config_value` text NOT NULL, PRIMARY KEY  (`config_name`) ) TYPE=MyISAM;

--
-- Dumping data for table `nuke_nsngr_config`
--

INSERT INTO `nuke_nsngr_config` VALUES ('perpage', '50');
INSERT INTO `nuke_nsngr_config` VALUES ('date_format', 'Y-m-d');
INSERT INTO `nuke_nsngr_config` VALUES ('send_notice', '1');
INSERT INTO `nuke_nsngr_config` VALUES ('version_number', '1.7.1');

-- --------------------------------------------------------

--
-- Table structure for table `nuke_nsngr_groups`
--

DROP TABLE IF EXISTS `nuke_nsngr_groups`;
CREATE TABLE `nuke_nsngr_groups` ( `gid` int(11) NOT NULL auto_increment, `gname` varchar(32) NOT NULL default '', `gdesc` text NOT NULL, `gpublic` tinyint(1) NOT NULL default '0', `glimit` int(11) NOT NULL default '0', `phpBB` int(11) NOT NULL default '0', `muid` int(11) NOT NULL default '0', PRIMARY KEY  (`gid`) ) TYPE=MyISAM;

--
-- Dumping data for table `nuke_nsngr_groups`
--

INSERT INTO `nuke_nsngr_groups` VALUES (1, 'Moderators', 'Moderators of this Forum', 0, 0, 3, 5);

-- --------------------------------------------------------

--
-- Table structure for table `nuke_nsngr_users`
--

DROP TABLE IF EXISTS `nuke_nsngr_users`;
CREATE TABLE `nuke_nsngr_users` ( `gid` int(11) NOT NULL default '0', `uid` int(11) NOT NULL default '0', `uname` varchar(25) NOT NULL default '', `trial` tinyint(1) NOT NULL default '0', `notice` tinyint(1) NOT NULL default '0', `sdate` int(14) NOT NULL default '0', `edate` int(14) NOT NULL default '0' ) TYPE=MyISAM;

--
-- Dumping data for table `nuke_nsngr_users`
--

INSERT INTO `nuke_nsngr_users` VALUES (1, 5, '', 0, 0, 2005, 0);

ALTER TABLE `nuke_blocks` ADD `groups` TEXT NOT NULL AFTER `view`;
ALTER TABLE `nuke_message` ADD `groups` TEXT NOT NULL AFTER `view`;
ALTER TABLE `nuke_modules` ADD `groups` TEXT NOT NULL AFTER `view`;
 
montego







PostPosted: Sat May 20, 2006 2:24 pm Reply with quote

Would you please post the table schema again, but for these three tables:

nuke_blocks
nuke_message
nuke_modules

By the way, this is assumes that your db prefix is "nuke"!
 
jnorris







PostPosted: Tue Jun 27, 2006 8:39 am Reply with quote

I found my problem, thanks everyone.. I eneded up finding it by accident.

Comment out this line in mainfile.php

Code:
   $str = eregi_replace("<a[^>]*href[[:space:]]*=[[:space:]]*\"?[[:space:]]*([^\" >]*)[[:space:]]*\"?[^>]*>",'<a href="\\1">', $str);
 
montego







PostPosted: Tue Jun 27, 2006 8:16 pm Reply with quote

Well, I fail to see how that has anything to do with this at all... Can you explain what you were doing in your block creation that this would have any affect on?
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.00.00 - v2.02.00 Distro

View next topic
View previous 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©