News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Custom Pages

Started by Robbo_, February 27, 2009, 09:59:39 AM

Previous topic - Next topic

dav12

Should I keep my hopes up for the search feature?

Robbo_

It's not going to be added anytime soon (if ever).
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

allisondk

#142
Any idea why i cant get it to work with SMF 2.0RC1-1. It seems to be a problem with the custom form fields?

I have to edit the index.php, but when i do it screws up the forum

Error when editing the index.php:
Parse error: syntax error, unexpected ';', expecting ')' in /xxxx/xxxx/xxxx/forum/index.php on line 327

allisondk

Solved, i added
   
    // Custom page action
    $actionArray['page'] = array('CustomPages.php', 'viewPage');
the wrong place  :P

Robbo_

I'll look at custom fields mod one day to work out why that happens.
If I have the motivation at the time I'll make it so you can put your pages onto a custom action instead of under the page action. eg "site.com?action=my_custom_page" instead of "site.com?action=page;sa=my_custom_page"
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

CowboyLogic

...Sounds promising

mark2300

Quote from: CowboyLogic on June 08, 2009, 12:34:42 AM
An Error Has Occurred!
Wrong value type sent to the database. Array of integers expected. (id) 

This was the latest .12 release... any ideas?

I, too, was getting this error. It appeared on the Edit Pages page in the Admin area. I found the cause, at least in my case:

I was previously running SMF 1.1.8 and had installed the "Pages Mod" by 2by2host. When I upgraded to SMF 2.0RC1-1, I removed the Pages Mod, but apparently the pages I had created with the Pages Mod were not removed, and the {db_prefix}pages table was left behind as well. Robbo_'s "Custom Pages" mod uses a table by the same name, and when it iterates through the table, it assumes all entries have a value in the id_page field. The entries left behind by the Pages Mod don't have a value in this field, though. Hence the error that an array of integers (ids) was expected, but not given--the missing id_page values (NULL) aren't integers.

If you don't mind losing the pages you've created so far, the best solution is to uninstall the Custom Pages mod, drop the {db_prefix}pages table, then reinstall the Custom Pages mod.

If you don't want to lose the pages you've created, there are two workarounds:

Insert this line into Sources/ManagePages.php at line 131:


WHERE id_page is not NULL


or, simply remove all of the entries in the {db_prefix}pages table that don't have an id_page value.

Hope this helps.

-Mark

mark2300

It appears this mod doesn't actually create any links to the custom pages it creates, is that correct? Therefore a separate mod would be needed to add those links to the main menu?

I used this mod to create a "Forum Rules" page that I wanted to make easily accessible from the main menu, just as I had done with the "Pages Mod" I mentioned in my previous post. However, after creating my new custom page, I don't see any links to it anywhere other than the Edit Pages page within the Admin area.

I just want to make sure I'm not overlooking something. Is there a link to my custom pages somewhere other than the Edit Pages page?

Thank you for making this mod, by the way. Although it doesn't appear to do exactly what I want, it does 90% of what I want, and I can manually do the other 10% without much difficulty (since I'm a PHP programmer also).

-Mark

Robbo_

Thanks for finding the solution to that bug. I haven't had time to look into it. I'll rename the tables next update which should fix everything :)

About the link. This mod only makes the pages, not links are added anywhere. The reason for this is because the next mod I will be making will be a custom links mod. Each mod will work together to easily add links to custom pages or whatever you want.
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

RedCairo

Hi there -- still no work with 1.1.9?  My main forum I have to do major redesign on for a July 1 start month-long party uses that, and a forum I'm setting up in the UK this weekend also to open July 1 has that. I really counted on using this mod (as I use it on my RC2 site elsewhere) in those forums!  Darn, I didn't expect that version wouldn't be available. Do you have any plans to do that soon (er, really soon)? Or should I just get the baker's dozen pages instead? I like yours so much better. Thanks again for it.  Palyne

PS I would volunteer to donate to inspire you but right now I overspent and don't even have food money. In a week I will though, if it would help!

Robbo_

Once I am done with my current clients I won't be taking anymore clients so I can work on my personal stuff like this mod. That could be anywhere from a couple weeks to a couple months.
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

Sabre™

First off, Robbo_ congrats mate, this is a useful mod :)
On a fresh install of SMF RC1-1 with only this mod installed, I created a test page and ran the HTML validator.
It returned with 11 errors.
Is anyone else experiencing this?

Cheers :)

EDIT
Slight error in the CustomPages.template.php... change
<table cellpadding="4" cellspacing="0" border="0" class="', $context['page']['page_class'], '"', empty($context['page']['page_styles']) ? '' : ' style="' . $context['page']['page_styles'] . '" ', 'width="100%">';


to
<table cellpadding="4" cellspacing="0" border="0" class="', $context['page']['page_class'], '"', empty($context['page']['page_styles']) ? '' : ' style="' . $context['page']['page_styles'] . '" ', ' width="100%">';


And I found if I don't select the Display title: box, then the page validates.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Robbo_

Personally I don't care about a page being valid. Since you brought it up I'll make sure the next patch it is xhtml valid. I test my mod on each browser and if it works then I'm happy but for you I'll make it valid ;)

I need a space before "width"? I'll look into it when I'm less under the influence ;) Thanks for your feedback.

I have had ISP problems so haven't been able to update this mod. I will try get the new version out by next week and then start porting to 1.1.9 after it is out.
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

Sabre™

Quote from: Robbo_ on July 12, 2009, 10:32:43 AM
Personally I don't care about a page being valid.

I've had the same chain of thought, but figured I may aswell start doing things 'correct', instead of half.
The space before width eliminates a structure error.
I'll have a look at the code after school, and help with validation, it shouldn't be too difficult.

Cheers
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Robbo_

Quote from: Sabre™ on July 12, 2009, 05:16:54 PM
Quote from: Robbo_ on July 12, 2009, 10:32:43 AM
Personally I don't care about a page being valid.

I've had the same chain of thought, but figured I may aswell start doing things 'correct', instead of half.
The space before width eliminates a structure error.
I'll have a look at the code after school, and help with validation, it shouldn't be too difficult.

Cheers
Thanks for your help. I will be sure to make future versions valid. When I said that I don't care about it, I didn't mean I wouldn't do it. If this was just for me then I probably wouldn't but since I have made this mod for a wide range of people I will try to cater for everyones requests. However only when I have time...
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

Sabre™

Quote from: Robbo_ on July 14, 2009, 10:23:09 AM
However only when I have time...

I know what you mean, my holidays finished as of yesterday, so now Im back to studying/training from 9:30am to 10:30pm most week days.
I'm afraid I wont be able to help (not that you need it anyways), as I only have a couple hours online now(if even that!).

Cheers, and thanks again for your efforts :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


chaky!

on the body accept php code?


thanks;)

Robbo_

PHP code isn't supported yet. Hopefully it will be in the next version. When I get around to making it that is.
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

ultide

Sir

is it compitable with smf 1.1.9???
[nofollow]

Robbo_

Multiple places give you an answer for that question. First there is the mod page, then there is the first post in this thread, then there is at-least another 5 posts (probably one on each page) in this thread. Find out the hard way (reading).
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

Advertisement: