vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Major Additions - Content Pages for vB 4.0 (https://vborg.vbsupport.ru/showthread.php?t=239235)

ccampo 03-27-2010 10:00 PM

Content Pages for vB 4.0
 
1 Attachment(s)
Content pages is the result of a need for a module that would handle normal TEXT, HTML and/or PHP pages within vBulletin, this need came after an old web site I was helping to administer switched from phpBB and phpNuke to vBulletin, after the migration lots of content pages were not migrated and there was not an easy way to achieve that either and these content pages were needed as they contain valuable information for the club. I searched for a similar mod that can handle this kind of information but couldn?t find any that would fit the needs of that site, so I decided to create my own and share it as freeware so everybody can benefit from it.

The power of this MOD lays in the fact that it can accept PHP, HTML and/or TEXT as the content for the page, so the use of this MOD is almost unlimited with almost no restriction.

Before adding your pages, please make sure they work as expected on a simple PHP, HTML or TEXT page without any error, making sure all tags are properly closed, and that the page do not contain tags which may affect your overall vBulletin style. You may apply any local style, though, but make sure those new css styles will not interfere with the original vBulletin styles.

Once the page has been tested as a basic php, html or text page you can just add a content page and paste the php/html/text code into the content of the new page, the same apply to the signature of the page which can also be a php, html or text code and it is appended to the content page at the end before rendering the page, the content and the signature are considered to be from the same type.

Features:
- Manage Content Pages
- PHP, HTML and TEXT pages supported
- Navtab plugin
- vB4.0.x compatible

Take a look at the contentpages-v1.0.0.pdf document included in the zip file for full description, installation and upgrade instructions.

I hope you like it.

Demo at :
http://www.o-r-c-a.com/forum/contpages.php

Latest version:
1.1.0 production

If you find bugs please let me know, I cannot dedicate to it 100%, but I can assure you I?ll find the time to fix any problem found, also if there?s any enhancement you think will be useful please also let me know and I?ll see what can I do to include it in a newer release.
This is my first vBulletin MOD, I?ve just started a couple of months ago when the club I am a member of acquired a vB 4.0 license, and prior to that I had no experience on this software, only as a user, not even moderator, on other forums.

Please remember to click "Mark as Installed" if you use this modification.
Also feel free to nominate this modification for the MOTM, and/or use the donate link provided (Support Developer).

Thanks to Dr.osamA for the Arabic translation.

djbaxter 03-28-2010 12:16 AM

I'd like to have a look at this, but...

Quote:

Download Now

No Files Uploaded.

ccampo 03-28-2010 12:24 AM

Quote:

Originally Posted by djbaxter (Post 2011328)
I'd like to have a look at this, but...

You're too quick, zip file has been uploaded.
This is my first vB MOD, so I'm just learning where to put things.
I'll attach some screenshots once I figure out where to upload them.

ProFifaLeagues 03-28-2010 12:29 AM

Would this install fine on 4.0 as well?

djbaxter 03-28-2010 12:38 AM

Quote:

Originally Posted by rammieone (Post 2011333)
Would this install fine on 4.0 as well?

Thread title: Content Pages for vB 4.0

So I'm going to guess "yes". :)

ProFifaLeagues 03-28-2010 12:39 AM

Quote:

Originally Posted by djbaxter (Post 2011342)
Thread title: Content Pages for vB 4.0

So I'm going to guess "yes". :)

But it also states vB Version: 4.0.2 :)

NFLfbJunkie 03-28-2010 12:50 AM

I'm getting a database error when importing the product

Database error in vBulletin 4.0.2:

Invalid SQL:
CREATE VIEW `ffbg_cp_cats` (cp_catsid, title) AS
SELECT `cid`, `title` FROM `vb_contentpages_categories`;

MySQL Error : CREATE VIEW command denied to user 'database_username'@'localhost' for table 'ffbg_cp_cats'
Error Number : 1142
Request Date : Saturday, March 27th 2010 @ 08:47:01 PM
Error Date : Saturday, March 27th 2010 @ 08:47:01 PM
Script : http://www.mydomain.com/testforum/ad...=productimport
Referrer : http://www.mydomain.com.com/testforu...?do=productadd
IP Address : my.ip.address
Username : my_username
Classname : vB_Database
MySQL Version : 5.0.90-community

NFLfbJunkie 03-28-2010 01:02 AM

Where exactly do I add - GRANT CREATE VIEW ON *.* TO 'database_username'@'localhost'? Is this something I have to do in phpMyAdmin? I have all of the database privileges (select, insert, update, delete, index, create temporary tables, create, alter, drop, lock tables, references and create routine) set to on

ccampo 03-28-2010 01:27 AM

Quote:

Originally Posted by Junkie (Post 2011364)
I noticed from your demo site that the content pages stretch the original width of the forum pages. Can this be fixed?

Yes, it can be fixed, in fact, it is now, you can see it for yourself in the same demo site. It was a problem with the template.
I'll release a fix once more problems are reported so I can fix them together and create a new version.

ccampo 03-28-2010 01:33 AM

Quote:

Originally Posted by Junkie (Post 2011346)
I'm getting a database error when importing the product

Database error in vBulletin 4.0.2:

Invalid SQL:
CREATE VIEW `ffbg_cp_cats` (cp_catsid, title) AS
SELECT `cid`, `title` FROM `vb_contentpages_categories`;

MySQL Error : CREATE VIEW command denied to user 'database_username'@'localhost' for table 'ffbg_cp_cats'
Error Number : 1142
Request Date : Saturday, March 27th 2010 @ 08:47:01 PM
Error Date : Saturday, March 27th 2010 @ 08:47:01 PM
Script : http://www.mydomain.com/testforum/ad...=productimport
Referrer : http://www.mydomain.com.com/testforu...?do=productadd
IP Address : my.ip.address
Username : my_username
Classname : vB_Database
MySQL Version : 5.0.90-community


Some web hosting providers revoke the "create view" privileges from users.
Talk to your web hosting providers and see if they can fix that for you.

Otherwise you can do that yourself, you just need to give your MySQL user the GRANT privilege like so.

GRANT CREATE VIEW ON *.* TO 'database_username'@'localhost' ;

You will need to be logged on as root or the main database user to do this.

ccampo 03-28-2010 01:33 AM

Quote:

Originally Posted by Junkie (Post 2011365)
Where exactly do I add - GRANT CREATE VIEW ON *.* TO 'database_username'@'localhost'? Is this something I have to do in phpMyAdmin? I have all of the database privileges (select, insert, update, delete, index, create temporary tables, create, alter, drop, lock tables, references and create routine) set to on

See my reply above, here's again :
You will need to be logged on as root or the main database user to do this.

or talk to your host provider, they should be able to help you.

ccampo 03-28-2010 01:36 AM

Quote:

Originally Posted by rammieone (Post 2011333)
Would this install fine on 4.0 as well?

I've tested this on 4.0.1, 4.0.2, 4.0.2 PL4 and it works in all of them, it should also work on the very base 4.0 version that was released.

NFLfbJunkie 03-28-2010 01:43 AM

How did you fix the page width problem?

NFLfbJunkie 03-28-2010 01:58 AM

I noticed from your demo site that the content pages stretch the original width of the forum pages. Can this be fixed?

ProFifaLeagues 03-28-2010 06:34 AM

Quote:

Originally Posted by ccampo (Post 2011357)
I've tested this on 4.0.1, 4.0.2, 4.0.2 PL4 and it works in all of them, it should also work on the very base 4.0 version that was released.


Many thanks

ccampo 03-28-2010 11:24 AM

Quote:

Originally Posted by Junkie (Post 2011389)
How did you fix the page width problem?

Fix was uploaded, you can download it again, it was a problem with the template.

NFLfbJunkie 03-28-2010 03:16 PM

Since I can not get your MOD to work, and wish I could, I installed another pages MOD. But this one has the same problem that yours initially did - the pages stretching across the entire page. I posted this in the MOD's thread, but still haven't gotten a response. Can you tell me what the fix was for your MOD so I can see if it possibly might apply to this one. Thanks.

mandingo 03-28-2010 08:36 PM

uhhh. So after getting the root database privileges changed I get this error now instead.
Quote:

Database error in vBulletin 4.0.2:

Invalid SQL:
CREATE VIEW `cp_cats` (cp_catsid, title) AS
SELECT `cid`, `title` FROM `vb_contentpages_categories`;

MySQL Error : Table '*****.vb_contentpages_categories' doesn't exist
Error Number : 1146
Request Date : Sunday, March 28th 2010 @ 04:31:24 PM
Error Date : Sunday, March 28th 2010 @ 04:31:25 PM
Script : http://mysite/admincp/plugin.php?do=productimport
Referrer : http://mysite/admincp/plugin.php?do=productadd
IP Address : 75.172.232.60
Username : yez
Classname : vB_Database
MySQL Version : 5.1.30

ccampo 03-28-2010 10:07 PM

I've found a big security hole when displaying php content pages so I've removed that feature from this mod, displaying php code also affects the look and feel of the vBulletin's style of the site and forum so for now, no php support, I've uploaded a new beta version 0.8.0 so please download and use that one instead.

ccampo 03-28-2010 10:14 PM

Quote:

Originally Posted by mandingo (Post 2011862)
uhhh. So after getting the root database privileges changed I get this error now instead.

That's weird, that error would only happen if the xml file was modified in some way to execute the SQL commands in some other order, the error means that the needed table to create the view doesn't exist, and that cannot be possible because that table is created right before creating the view, unless that create table also failed?.

I'd suggest you to deinstall "Content Pages" products, then use phpMyAdmin to make sure tables vb_contentpages and vb_contentpages_categories do not exist, otherwise drop them and then import the new 0.8.0 xml file again.

good luck.

ccampo 03-28-2010 10:38 PM

Quote:

Originally Posted by Junkie (Post 2011669)
Since I can not get your MOD to work, and wish I could, I installed another pages MOD. But this one has the same problem that yours initially did - the pages stretching across the entire page. I posted this in the MOD's thread, but still haven't gotten a response. Can you tell me what the fix was for your MOD so I can see if it possibly might apply to this one. Thanks.

My fix will not work for his mod.
The fix will have to come from him, because it requires changing the template and the php code as well, an easy workaround would be to modify just the template, I haven't tested that though, but here it is :

look for :
<link rel="stylesheet" type="text/css" href="clientscript/reset-fonts-bf.css" />

and change it to:
<vb:if condition="$pl['phpsupport']">
<link rel="stylesheet" type="text/css" href="clientscript/reset-fonts-bf.css" />
</vb:if>

ccampo 03-29-2010 04:30 AM

One new version was released v0.9.0, this one now supports PHP content pages.
Beware that if you have already installed the previous v0.8.0 version you'll need to upgrade the product, the instructions are included in the contentpages-v0.9.0.pdf document included in the zip file.
But here they are too:
1. Take an export of the TABLE_PREFIX.contentpages and TABLE_PREFIX.contentpages_categories tables, using phpMyAdmin is the easiest way.
2. Uninstall old “Content Pages” product from vB Administrator Control Panel
3. Install new “Content Pages” version 0.9.0 product from vB Administrator Control Panel
4. Import the TABLE_PREFIX.contentpages and TABLE_PREFIX.contentpages_categories tables that were exported on step 1.

Storyteller69 03-29-2010 08:00 AM

Quote:

Originally Posted by mandingo (Post 2011862)
Database error in vBulletin 4.0.2:

Invalid SQL:
CREATE VIEW `cp_cats` (cp_catsid, title) AS
SELECT `cid`, `title` FROM `vb_contentpages_categories`;

MySQL Error : Table '*****.vb_contentpages_categories' doesn't exist
Error Number : 1146
Request Date : Sunday, March 28th 2010 @ 04:31:24 PM
Error Date : Sunday, March 28th 2010 @ 04:31:25 PM
Script : http://mysite/admincp/plugin.php?do=productimport
Referrer : http://mysite/admincp/plugin.php?do=productadd
IP Address : 75.172.232.60
Username : yez
Classname : vB_Database
MySQL Version : 5.1.30

I get the same error when i try to install version 0.9.0 the first time with this Stack Trace:
#0 vB_Database->halt() called in [path]/includes/class_core.php on line 421
#1 vB_Database->execute_query() called in [path]/includes/class_core.php on line 439
#2 vB_Database->query_write() called in [path]/includes/adminfunctions_plugin.php(450) : eval()'d code on line 12
#3 run_queries() called in [path]/includes/adminfunctions_plugin.php(450) : eval()'d code on line 50
#4 eval() called in [path]/includes/adminfunctions_plugin.php on line 450
#5 install_product() called in [path]/admincp/plugin.php on line 1714

The tables where created but with "my" prefix vb_3 and not only vb_. On a local-testforum without a table-prefix i get the same error. Can the "wrong" prefix be the reason for the error?

Miras 03-29-2010 11:08 AM

there's a bug inside the xml

search for
Code:

$SQL[] = "CREATE VIEW `" . TABLE_PREFIX . "cp_cats` (cp_catsid, title) AS
          SELECT `cid`, `title` FROM `vb_contentpages_categories`";

replace with
Code:

$SQL[] = "CREATE VIEW `" . TABLE_PREFIX . "cp_cats` (cp_catsid, title) AS
          SELECT `cid`, `title` FROM `" . TABLE_PREFIX . "contentpages_categories`";


ccampo 03-29-2010 11:33 AM

Quote:

Originally Posted by Miras (Post 2012181)
there's a bug inside the xml

Thanks a lot Miras, new zip file with the fix was uploaded.

Storyteller69 03-29-2010 11:35 AM

Also thanks from me Miras, works now! :up:

abdicar 03-29-2010 08:12 PM

hello bro, when do you think this will be ready for production forums?

ccampo 03-29-2010 10:05 PM

Quote:

Originally Posted by abdicar (Post 2012466)
hello bro, when do you think this will be ready for production forums?

Even though this MOD still has the BETA label in it I think it is ready for production, I'll give one more week for others to test it and report problems (if found) before I remove the beta label and create the first production version.

I've done lots of tests, but I'm sure I haven't tested everything that's why I need your help finding bugs or problems.

mandingo 03-29-2010 10:33 PM

Quote:

Originally Posted by ccampo (Post 2012190)
Thanks a lot Miras, new zip file with the fix was uploaded.

Will try again.

Skreech94 03-30-2010 02:54 AM

I'm getting this error when I click Add page

Database error in vBulletin 4.0.2:

Invalid SQL:
SELECT title, cp_catsid FROM cp_cats ORDER BY title;

MySQL Error : Table 'mydatabase_consoledge.cp_cats' doesn't exist
Error Number : 1146
Request Date : Monday, March 29th 2010 @ 11:10:55 PM
Error Date : Monday, March 29th 2010 @ 11:10:55 PM
Script : http://unlockedgamer.com/admincp/con...php?do=addpage
Referrer : http://unlockedgamer.com/admincp/index.php?do=nav
IP Address : My IP
Username : Username
Classname : vB_Database
MySQL Version : 5.1.30

ccampo 03-30-2010 03:46 AM

Quote:

Originally Posted by Skreech94 (Post 2012618)
I'm getting this error when I click Add page

Database error in vBulletin 4.0.2:

Invalid SQL:
SELECT title, cp_catsid FROM cp_cats ORDER BY title;

MySQL Error : Table 'mydatabase_consoledge.cp_cats' doesn't exist
Error Number : 1146
Request Date : Monday, March 29th 2010 @ 11:10:55 PM
Error Date : Monday, March 29th 2010 @ 11:10:55 PM
Script : http://unlockedgamer.com/admincp/con...php?do=addpage
Referrer : http://unlockedgamer.com/admincp/index.php?do=nav
IP Address : My IP
Username : Username
Classname : vB_Database
MySQL Version : 5.1.30

The problem is that the cp_cats view was not created during the product import and your database user probably do not have privilege for creating that either, the view is needed to retrieve the available categories. Adding and editing a page needs that view to make sure a page has a valid category.
But there are good news, on Saturday April 3rd. I'll release the production version of content pages and the use of that view will not be needed anymore since I changed it to use a pre-populated array of categories instead of the view.

ccampo 04-02-2010 08:35 PM

First official production version was released 1.0.0 and it is now ready to be downloaded.
All reported problems have been fixed.
Enjoy it.

CoZmicShReddeR 04-02-2010 10:26 PM

Just download this got "XML Error: EntityRef: expecting ';' at Line 8" when I tried to install it...

ccampo 04-03-2010 02:29 AM

Quote:

Originally Posted by CoZmicShReddeR (Post 2014864)
Just download this got "XML Error: EntityRef: expecting ';' at Line 8" when I tried to install it...

There was a missing & in the versioncheck line, fixed, download it again.

Leica.Robbiani 04-03-2010 02:58 AM

1 Attachment(s)
Hi,

Quote:

got "XML Error: EntityRef: expecting ';' at Line 8" when I tried to install it...
Just delete the line <versioncheckurl> in the product-xml file or change it to <versioncheckurl />...

But the site is looking a little bit strange in Internet Explorer:

Attachment 115216

The right display of the page should be like this one in Firefox:

Attachment 115217

L.R.

ccampo 04-04-2010 04:54 PM

Quote:

Originally Posted by Leica.Robbiani (Post 2014957)
But the site is looking a little bit strange in Internet Explorer:

Attachment 115216

The right display of the page should be like this one in Firefox:

Attachment 115217

L.R.

I was not able to reproduce your exact problem, however I fixed some MSIE related css style problems which might be able to help you.

I've just uploaded a new 1.0.1 version, unzip and upload all php files again to your host and import the xml file, let me know if that fixes the problem.

KeystoneAirsoft 04-10-2010 06:51 PM

Hi all,

Downloaded both the 1.0.0 and the 1.0.1 versions and tried to install this. I am getting this error message when tryng to add Category:

Quote:

Database error in vBulletin 4.0.2:

Invalid SQL:
SELECT c.cid, c.title, c.icon, c.description, count(p.pid) AS pagecount
FROM contentpages AS p
LEFT JOIN contentpages_categories AS c ON c.cid = p.cid WHERE 1
GROUP BY c.cid, c.title, c.icon;

MySQL Error : Table 'mytable.contentpages' doesn't exist
Error Number : 1146
Request Date : Saturday, April 10th 2010 @ 03:24:11 PM
Error Date : Saturday, April 10th 2010 @ 03:24:12 PM
Script :
Referrer :
IP Address : xxx.xxx.xxx.xxx
Username :
Classname : vB_Database
MySQL Version : 5.0.90-community
After looking in my phpmyadmin I did not find the 2 tables it is supposed to create upon uploading the xml file. The database user has full access to database.


I have tried to uninstall mod and get this error message:

Quote:

Database error in vBulletin 4.0.2:

Invalid SQL:
DROP TABLE `contentpages`;

MySQL Error : Unknown table 'contentpages'
Error Number : 1051
Request Date : Saturday, April 10th 2010 @ 03:50:18 PM
Error Date : Saturday, April 10th 2010 @ 03:50:18 PM
Script : http://mysite/admincp/plugin.php?do=productkill
Referrer : http://mysite/admincp/plugin.php?do=...ontentpages&s=
IP Address : xxx.xxx.xxx.xxx
Username :
Classname : vB_Database
MySQL Version : 5.0.90-community

Any help or suggestion would be appreciated. Thanks in advance.

ccampo 04-11-2010 09:58 PM

There was a problem with the file_exists php function and some file existence verification was failing and was aborting the rest of installation steps.
the xml was fixed and i removed that verification.
I also uploaded a sql script to create those tables manually using phpmyadmin so you can use the MOD.
Just run the SQL script to manually create the tables and use the MOD, or uninstall it and then install it again using the latest zip file.

ccampo 04-11-2010 10:02 PM

1 Attachment(s)
Here's the script.

firefoxextreme 04-11-2010 10:44 PM

Excellent mod thanks, click installed now.


All times are GMT. The time now is 05:55 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02096 seconds
  • Memory Usage 1,861KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete