Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
blind
New Member
New Member



Joined: Jun 24, 2006
Posts: 24

PostPosted: Fri Jul 14, 2006 8:26 pm Reply with quote

I am looking for a bit of help with changing the tables that the news module normally reads.

So basicly i want to make the news read ????_stories etc... insted of nuke_stories

Anyone know how i can do this ?
 
View user's profile Send private message
gregexp
The Mouse Is Extension Of Arm



Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Fri Jul 14, 2006 9:18 pm Reply with quote

Renaming the tables is possible through phpmyadmin, but in EVERY senario of $prefix within anything that calls on those tables will need to be edited.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
blind







PostPosted: Fri Jul 14, 2006 9:32 pm Reply with quote

Yea when i was lookign at the index files and stuff i noticed the $prefix and assumed it would be whats needed to change. But how do i change it do i just put $???? insted of $prefix ?
 
gregexp







PostPosted: Fri Jul 14, 2006 9:40 pm Reply with quote

$prefix variable is the prefix to all your tables in the database

ie

$prefix=nuke
nuke_authors
$prefix=bob
bob_authors

See what I mean now, you can do this one of 2 ways, one way seems easier to me:

In config.php just below $prefix
Add $prefix1 = "news";

Then throughout ever reference you find $prefix_stories, change to $prefix1_stories

Thatll set it up properly. And ussually, itll be ".$prefix."_stories, just an FYI.
 
blind







PostPosted: Fri Jul 14, 2006 9:43 pm Reply with quote

K thanks alot!

I'll check that out a bit later & post if i have any problems Very Happy
 
ravenlife
Regular
Regular



Joined: May 07, 2006
Posts: 62

PostPosted: Sun Jul 16, 2006 1:02 am Reply with quote

same question as me - so im jumping in

darklord

this is all well and good but i dont much fancy going through ever nuke file for a reference to _stories

as its obvious not jsut in the news module its self

also - what would happen if you wanted two tables running at the same time

surely i would have to add a second prefix link

to every file right?
 
View user's profile Send private message
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Sun Jul 16, 2006 1:12 am Reply with quote

Unfortunately there's no easy way around it. Every phpNuke file uses $prefix to reference its tables. The option to search text in files really helps here.

What do you mean, running two tables at the same time?

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
ravenlife







PostPosted: Sun Jul 16, 2006 1:26 am Reply with quote

running two news modules at the same time

you can take a look at the idea here
main site - [ Only registered users can see links on this board! Get registered or login! ]
second module - [ Only registered users can see links on this board! Get registered or login! ]

btw the reason the posts are differnt is because i add the files in phpmyadmin

it wont post from admin for some reason

EDIT

okay so i have checked the most obvious files - ones in root and admin
and the most obvious ones in blocks

only real reference i can find is in mainfile.php
but thats just for topics

this should work

EDIT 2

could someone tell me exactly what this is

/admin.php?op=adminStory

i get that in adress bar when i post a newws article

where do i find that refernce - as i cant see it in admin.php
 
evaders99







PostPosted: Sun Jul 16, 2006 11:06 pm Reply with quote

All the op references are done in the admin/case/ or modules/MODULE_NAME/admin.case.php files
 
blind







PostPosted: Mon Jul 17, 2006 3:57 am Reply with quote

Alrighty. This is being draged on and on (btw no sucsess) but i dont think the full idea of my intent has been clairifyed!

I would like to know if and how i can have 1 nuke but 2 completely differnt news modules. I have gotten the general idea that i need to have the (module) installed but in order for it to be totaly seperate from the orginal nuke one it needs to read from a differnt prefix.

Would anyone know how i can do this & mae it actualy work ?
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Mon Jul 17, 2006 5:33 am Reply with quote

It doesn't necessarily follow that you have to have a different prefix, so long as there is no chance of mixing the data. For example where references in the module files code to ".$prefix"_stories you could equally make that ".$prefix"_stories1
 
View user's profile Send private message Send e-mail
blind







PostPosted: Mon Jul 17, 2006 5:45 am Reply with quote

Well thats VERY! good to know. And i will most likely use it if all else fails, but!! what would be the best way to make it so its not just the _stories that are different ?

As i mentioned i would like to have the "Complete" module seperate from the original.

Oh and before i forget, Is there not a "If" statement i could use in the php files to make my life easier rather then doing all the searching !
 
ravenlife







PostPosted: Tue Jul 18, 2006 4:59 am Reply with quote

thats exactly what i did

changed from $prefic_stories to $prefix_storiesV2

this didnt work -

the strange thing is, is that when i place the news article into mysql
it shows it - on the second news module,

but when i add with admin it doesnt work

so there is something in admin that isnt working
i dont believe the prefix is the problem
 
gregexp







PostPosted: Tue Jul 18, 2006 10:33 am Reply with quote

Which version of news are you using, I'll personally make this.

You are missing the edits needed, not that you haven't been told how, just that you havent changed them all, It's ok though. We'll get this all sorted out.

You cant just edit the admin, You have to edit EVERY file in the news module.

To make 2 seperate news modules, You'll have top change EVERY reference to modules/news and make then modules/news2 or whatever you renamed the second module to.

Sorry But now that I have a clue as to what your trying to do, seems to be that somethings I have posted previously would help about half way.

This will take some time So let me know if this is what youd like.
 
blind







PostPosted: Tue Jul 18, 2006 1:49 pm Reply with quote

Yes darklord it seems like you have gotten it right with what we are trying to do.

NSN News is what we are using!

But i still was wondering isnt there an "if" statement that could be added to each file to tell the php that when a refferance is made to change it to "????".
 
ravenlife







PostPosted: Tue Jul 18, 2006 4:04 pm Reply with quote

well thanks darklord

i figured it was something we were missing

although - i thought i had changed every refernce

thank you for the help - any chance of a list of files to edit once completed - so we know for next time

see this is why i come here - fabulous ppl

thanks

RavenLife
 
gregexp







PostPosted: Tue Jul 18, 2006 6:26 pm Reply with quote

Tell you what I,ll do. Ill globalize some variables and swet a config file within the module folder so that you can set modulename and set the prefix so that you can easily add 2 of the same module and change 2 things and be done, Ill also send you and installer to run via php, let me work on it this weekend as Im swamped and hopefully will have time.
 
ravenlife







PostPosted: Tue Jul 18, 2006 6:28 pm Reply with quote

thankyou darklord

we will wait for as long as it takes

thank you agian

RL
 
blind







PostPosted: Tue Jul 18, 2006 6:32 pm Reply with quote

d*** darklord!

Talk about helping out. As RavenLife said take your time & let us know when your complete. This is amasing that somone would take the tiem to do somthing like that just to help out.

Im stunned & lost for words.
 
gregexp







PostPosted: Tue Jul 18, 2006 8:56 pm Reply with quote

I kinda feel like blushing Laughing

I like to contribute to the comunity and am learning with each new project. Ohh you didnt think I had nothing to gain did you?

This will be an excellent learning project and anyone who has seen me work towards something knows I will keep pushing till I come up with something functional and working correctly.
 
Guardian2003







PostPosted: Tue Jul 18, 2006 10:13 pm Reply with quote

If non admins will need to add news, you'll have to do the submit_news module too Wink
 
gregexp







PostPosted: Tue Jul 18, 2006 11:05 pm Reply with quote

Actually after thinking bout it, I planned on getting with them and asking what all they wanted this module to do.

News has a lot of functions that will make this 10 times harder to make it do all theyd like.

But they will inform me as to what they want to use this module for I'm sure.
 
ravenlife







PostPosted: Thu Jul 20, 2006 5:02 am Reply with quote

sorry for not replying but i dont seem to be getting notification emails.

what would you like to know dark

we can discuss here - or anywhere you would like


- the actuall function of this module - and others (which is why i asked to do a small tut)
is to have seperate news page areas
for differnt news articles

i'll try to explain more clearly

we run a PC/console forums - so we would like news and tutorials (this you dont need to worry about)
on seperate pages, to help us keeep the site tidy and easy to navigate.

if you would like to discuss more indepth im available via email or msn.

thanks

RavenLife
 
gregexp







PostPosted: Thu Jul 20, 2006 11:38 am Reply with quote

Ahh, but do you need it to display ALL the news or just one page?

Would you like others to be able to post news?

Do you want this to be displayed on the mainpage?

All of those options must be takin into consideration before we continue.
 
Guardian2003







PostPosted: Thu Jul 20, 2006 1:38 pm Reply with quote

You could use something like Tutoriax for your tuts modules or even the Content module at a push.
I'm just trying to get a feel for what you are trying to do thats all but why wouldn't just putting news into two or more specific categories work for you?
You have obviously thought of that and there must be some specific reason why you want to have two seperate modules.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

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 ©