Author |
Message |
blind
New Member
Joined: Jun 24, 2006
Posts: 24
|
Posted:
Fri Jul 14, 2006 8:26 pm |
|
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 ? |
|
|
|
|
gregexp
The Mouse Is Extension Of Arm
Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol
|
Posted:
Fri Jul 14, 2006 9:18 pm |
|
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!! |
|
|
|
blind
|
Posted:
Fri Jul 14, 2006 9:32 pm |
|
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
|
Posted:
Fri Jul 14, 2006 9:40 pm |
|
$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
|
Posted:
Fri Jul 14, 2006 9:43 pm |
|
K thanks alot!
I'll check that out a bit later & post if i have any problems |
|
|
|
|
ravenlife
Regular
Joined: May 07, 2006
Posts: 62
|
Posted:
Sun Jul 16, 2006 1:02 am |
|
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? |
|
|
|
|
evaders99
Former Moderator in Good Standing
Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Sun Jul 16, 2006 1:12 am |
|
|
|
|
ravenlife
|
Posted:
Sun Jul 16, 2006 1:26 am |
|
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
|
Posted:
Sun Jul 16, 2006 11:06 pm |
|
All the op references are done in the admin/case/ or modules/MODULE_NAME/admin.case.php files |
|
|
|
|
blind
|
Posted:
Mon Jul 17, 2006 3:57 am |
|
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
|
Posted:
Mon Jul 17, 2006 5:33 am |
|
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 |
|
|
|
|
blind
|
Posted:
Mon Jul 17, 2006 5:45 am |
|
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
|
Posted:
Tue Jul 18, 2006 4:59 am |
|
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
|
Posted:
Tue Jul 18, 2006 10:33 am |
|
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
|
Posted:
Tue Jul 18, 2006 1:49 pm |
|
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
|
Posted:
Tue Jul 18, 2006 4:04 pm |
|
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
|
Posted:
Tue Jul 18, 2006 6:26 pm |
|
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
|
Posted:
Tue Jul 18, 2006 6:28 pm |
|
thankyou darklord
we will wait for as long as it takes
thank you agian
RL |
|
|
|
|
blind
|
Posted:
Tue Jul 18, 2006 6:32 pm |
|
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
|
Posted:
Tue Jul 18, 2006 8:56 pm |
|
I kinda feel like blushing
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
|
Posted:
Tue Jul 18, 2006 10:13 pm |
|
If non admins will need to add news, you'll have to do the submit_news module too |
|
|
|
|
gregexp
|
Posted:
Tue Jul 18, 2006 11:05 pm |
|
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
|
Posted:
Thu Jul 20, 2006 5:02 am |
|
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
|
Posted:
Thu Jul 20, 2006 11:38 am |
|
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
|
Posted:
Thu Jul 20, 2006 1:38 pm |
|
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. |
|
|
|
|
|