1
Cozzie
how does xoops upload data to the database
  • 2009/6/17 9:59

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


Hi there, I'm trying to get a better idea of how XOOPS works and I want to understand which files upload data to the database tables.

So for example, in newbb when a new topic is added (using newbb/newtopic.php) how does the content of the question get added to the newbb database tables? Which file does this?

thanks a lot for any tips

2
culex
Re: how does xoops upload data to the database
  • 2009/6/17 12:03

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


In the case of newbb the newtopic calls the form.post.php if permission and post to the mysql.
Programming is like sex:
One mistake and you have to support it for the rest of your life.

3
trabis
Re: how does xoops upload data to the database
  • 2009/6/17 12:37

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Module object handlers. You can find them under the module class folder. But really, you need to know how MySQL and php works, not XOOPS. You need to learn the language so you can understand what you read. You need to know, at every point, what is made by XOOPS and what is not.

4
Cozzie
Re: how does xoops upload data to the database
  • 2009/6/18 2:57

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


Thanks guys!

Culex, can you tell me where the form.post.php file is, i can't find it!

5
culex
Re: how does xoops upload data to the database
  • 2009/6/18 10:40

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


Sure. you'll find the form.post.php in

newbb\include\

But Trabis is more accurate in his answer. Look in the newbb/class/ folder for.instance at post.php to see how the module handles posting
Programming is like sex:
One mistake and you have to support it for the rest of your life.

6
Cozzie
Re: how does xoops upload data to the database
  • 2009/6/24 2:09

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


Thanks a lot!

I've been trying to get something done but just can't, I wonder if you guys can help me?

I'm using newbb seo unfortunately as I'm also using xlanguage the rewritten urls and meta description don't work because they display the language tags [en][/en].

To fix this I had to add 2 extra fields to the xoops_bb_topics table, I called these topic_url and description. But of course I have to edit them by hand which is not really realistic to keep doing.

Because when users first post they write in only one language it would work perfectly if I could add the subject and message to the topic_url fields and description fields.

So can anyone tell me, how I can add existing data (which is already added to existing fields) to 2 new fields I have created?

I've tried for ages to get this to work but I just can't so i would be so grateful if you could give me some advice.

thanks!

7
ghia
Re: how does xoops upload data to the database
  • 2009/6/24 2:50

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


For catching up you could run an SQL command in phpMyAdmin:
UPDATE xoops_bb_topics SET topic_url subjectdescription message;

For daily use you need to add variables for the new fields in topic.php and fill them alike where the regular fields subject and message are filled (setvar in post.php).
For the xLanguage tag problem see this.

8
Cozzie
Re: how does xoops upload data to the database
  • 2009/6/25 0:42

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


Brilliant answer, thanks a lot Ghia!!! That's just what I needed

Login

Who's Online

439 user(s) are online (346 user(s) are browsing Support Forums)


Members: 0


Guests: 439


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits