SW:Rebellion NetworkHosted by the SW:Rebellion Network
Welcome to Evaders Squadron Coding [ESC]
Home Forums Nuke Patched Core Coding Services Webmaster Services Personal
  Login/Create an Account    

Forums
· Forums FAQ
· Search
· Usergroups
· Profile
· Private Messages

Support Us
This site runs with your support. Please donate:

User Info/Login
Welcome, Anonymous
Nickname
Password
Security Code: Security Code
Type Security Code

(Register)
Membership:
Latest: as7apcool
New Today: 0
New Yesterday: 3
Overall: 6732

People Online:
Visitors: 13
Members: 0
Total: 13

Link to Us

Affliates
RPG Boards Hosting

Evaders Squadron Coding [ESC] :: View topic - [--pagebreak--] in a custom module
[--pagebreak--] in a custom module

 
Post new topic   Reply to topic    Evaders Squadron Coding [ESC] Forum Index -> Anything else
View previous topic :: View next topic  
Author Message
outseeker
Newbie
Newbie


Joined: Feb 01, 2007
Posts: 9
Location: Australia baby!

PostPosted: Sat Mar 08, 2008 3:00 pm    Post subject: [--pagebreak--] in a custom module Reply with quote

Hey buddy, first up you're still doin a friggin great job- thanks so much for your work and support of the phpnuke system over the years. My question is about the [--pagebreak--] function within a custom module page. I don't know how exactly to code it up and am wondering if you can help me out? I will give you a link so you can see the details easily:

http://outer.reaches.dyndns.org/modules.php?name=Legalise_It

I can find the code within the Content module's index.php that splits up pages, but it's quite long and I don't exactly understand how it is splitting up the pages. Especially where I want to copy the code into my own module and have it work. Not a clue where to start to be honest. If you can offer me any help, it would be majorly appreciated!

Also on a totally different topic, have you seen Mighty_Y anywhere lately!?!? portedmods and area51 both seem to have died! Is Mighty_Y no longer around? (I ask cuz I'm looking to get his Attach Mod working again hehe)

Best Regards,
Outseeker.
Back to top
View user's profile Send private message Visit poster's website
Evaders99



Joined: Jan 11, 2002
Posts: 3041
Location: USA

PostPosted: Sat Mar 08, 2008 6:00 pm    Post subject: Reply with quote

Well basically you would read the entire contents and use PHP's split() function to break it down by the pagebreaks.
And then figure out which page you're supposed to be reading.

There's a lot of code to generate the page numberings and such, but it shouldn't be too complicated.

I haven't seen Mighty_Y.
I am working on getting the latest Attachment_Mod working. Just have to polish it up to release it
_________________
Evaders99
SW:Rebellion Fans! Webmaster
Star Wars roleplaying community! Administrator

Fighting is terrible, but not as terrible as losing the will to fight.
- SW:Rebellion Network - Evaders Squadron Coding -
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
outseeker
Newbie
Newbie


Joined: Feb 01, 2007
Posts: 9
Location: Australia baby!

PostPosted: Sun Mar 09, 2008 6:25 am    Post subject: Reply with quote

ahh very glad to hear you are polishing it up for release mate! think I will hold out until you are finished as from what I have read the attach mod in its currently released state has some security issues. Sad to hear you haven't heard from Mighty though, he was a total gun. It would be a major shame if he's bowed out of the scene completely after all this bs with the portedmods.com owner etc.. :/

Any chance you could try and remember to let me know when it's ready to be released? I'm more than happy to help you test it if you like beforehand. I'm running current versions of phpnuke and bbtonuke Smile

Any way you could help me through this page splitting thing in a slightly more descript fashion? I've never seen the split() function and dont exactly understand how you can split one page and keep track of what is to be considered page1, page2 etc. It's extremely cryptic to me mate!

Thanks heaps for the reply Evaders, you yourself have always been a gun too Wink
_________________
outseeker.
http://outer.reaches.dyndns.org/index.php
Back to top
View user's profile Send private message Visit poster's website
Evaders99



Joined: Jan 11, 2002
Posts: 3041
Location: USA

PostPosted: Mon Mar 10, 2008 2:39 pm    Post subject: Reply with quote

Attachment_mod is a security issue... mainly it allows uploading of files to your server! Smile
It's really how much you trust your users not to upload bad stuff on there.

I'll try and let you know when its ready for release.

Really I can't give you any code off-hand. I can hardly decrypt some of the phpNuke code sometimes... Wink

Basic pseudo-code

Code:


$contents = QUERY ON CONTENT#
$contents_array = split('[--pagebreak--]',$contents);
if ($page_number < count($contents_array))
  DISPLAY($contents_array[$page_number]);


_________________
Evaders99
SW:Rebellion Fans! Webmaster
Star Wars roleplaying community! Administrator

Fighting is terrible, but not as terrible as losing the will to fight.
- SW:Rebellion Network - Evaders Squadron Coding -
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
outseeker
Newbie
Newbie


Joined: Feb 01, 2007
Posts: 9
Location: Australia baby!

PostPosted: Mon Mar 10, 2008 3:44 pm    Post subject: cheers mate! Reply with quote

Thanks champ, I will try to get my head around that one. Your pseudo-code helps quite a bit as the content's index file is quite long and cryptic Very Happy

rofl @ why attach mod is a security issue Laughing good call! Cool

Put my name on your desktop or something so u don't forget to keep me in the loop!
_________________
outseeker.
http://outer.reaches.dyndns.org/index.php
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Evaders Squadron Coding [ESC] Forum Index -> Anything else All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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

^Top
Home Your Account Forums Downloads F.A.Q. Submit News Hosting Contact Us

© 2005 - 2007 by Evaders99. All Rights Reserved.
All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters.
You can syndicate our news using the file backend.php
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL.
PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.68 Seconds