CRON-jobs

Discuss all aspects of programming here.

Moderator: The Mod Squad

Postby Toby B. » Sat Nov 06, 2004 2:09 pm

ahh, ok....Thanks!! 8)
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby atang1 » Mon Nov 08, 2004 2:51 am

Isn't cron-jobs merely scheduled synchronization of data(webpages wvwn) from repositories?
atang1
 

Postby Toby B. » Sun Nov 14, 2004 11:05 pm

MoboCop wrote:
Toby B. wrote:
MoboCop wrote:if you are using phpbb the easiest way is to use the custom function insert post which is a third party function you can find searching the phpbb forums.

It comes with some basic instructions which should help you get started (if you know php you should be ok).


I found a MOD "InsertPost", but cannot figure it out for the life of me... :oops:


Once you have it installed you need to write a script that calls the function

insert_post()

You will need to fill the variables with your data.

You also might want to read through the post on phpbb about it it is huge and lots of questions asked in there.

Also there is a link to the guys website and he has some forums there as well.


Ok the InsertPost MOD is successfully installed and working. Now I just have to come up with a script to manage the other portion of the project...

Sorry I am quite new to php and dont know what to do or where to do it. The thread at phpbb.com really did not answer my questions, and nobody there seems to eager to help. The MOD author does have a site/forum but why bother trying to ask questions there on the subject when I cant even get a proper response on phpbb.com...The most help I have recieved on this subject has been here... :D

So now comes the script to add the links appropriately, as mentioned before I am looking to have a link on the board page(s) and have them linked to the thread(s)......

Thanks...
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby MoboCop » Sun Nov 14, 2004 11:19 pm

Toby, your question unfortunately is very generic. I dont know how your data is added or stored, therefore it is difficult to provide you specific answers.

Here is a generic answer.

Your script needs to gather the data you want to insert. Subject field and data would be the most appropriate I Think.

Once your script has these it then should call the insert post function and pass these into the appropriate parameters. Once the function is finished it returns a variable with the new topic_id, which you could take and insert where you want it, on a specific page or in a database field if you are using one.

There is example code which comes with insert_post and it is a good place to start. If you want more detailed help you are going to have to provide more details of your setup.
Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstien
MoboCop
Drunken Master
 
Posts: 8854
Joined: Tue Jan 18, 2000 1:01 am
Location: Fresno

Postby Toby B. » Sun Nov 14, 2004 11:30 pm

There is example code which comes with insert_post and it is a good place to start. If you want more detailed help you are going to have to provide more details of your setup.


Sorry about the generics. currently my site is strictly HTML files (i.e. no database connection/integration beyond the forum)....Right now I only have 1 reliable database which is taken up with the forum.
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby MoboCop » Sun Nov 14, 2004 11:37 pm

Toby B. wrote:
There is example code which comes with insert_post and it is a good place to start. If you want more detailed help you are going to have to provide more details of your setup.


Sorry about the generics. currently my site is strictly HTML files (i.e. no database connection/integration beyond the forum)....Right now I only have 1 reliable database which is taken up with the forum.


So let me see if I understand.

1) you update an html manually.
2) you then add a new topic in phpbb for that new file with a link to the html file.
3) you then add a link on the html file back to the topic in phpbb.

If this is correct or not let me know. If not correct please make a similar list with each step you have to do now. Be specific. Then I will try to give you a less generic method of doing what you want.

Also please provide me a link to all the pages in question and a link to a post in the forums.

thanks.
Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstien
MoboCop
Drunken Master
 
Posts: 8854
Joined: Tue Jan 18, 2000 1:01 am
Location: Fresno

Postby Toby B. » Sun Nov 14, 2004 11:51 pm

1) you update an html manually.
2) you then add a new topic in phpbb for that new file with a link to the html file.
3) you then add a link on the html file back to the topic in phpbb.


Exactly....

One of the board pages (I haven't updated all of the cuurrent pages yet as I am still plugging away at a large update for this section):
http://s87841630.onlinehome.us/model/aspen/aspen.html

At the bottom of the board page I put a "discuss this page" link...

The forum section has been prunned to make room for the new links (i.e. automated links)...There are test posts from the InsertPost MOD:
http://s87841630.onlinehome.us/forum/viewforum.php?f=14
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby MoboCop » Sun Nov 14, 2004 11:56 pm

ok none of those forum posts exist. Please make a forum post exactly like you want it refering to an html page. I need to see it, please.
Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstien
MoboCop
Drunken Master
 
Posts: 8854
Joined: Tue Jan 18, 2000 1:01 am
Location: Fresno

Postby Toby B. » Mon Nov 15, 2004 12:09 am

MoboCop wrote:ok none of those forum posts exist. Please make a forum post exactly like you want it refering to an html page. I need to see it, please.


ok, sorry about that...

Sample ASPEN2 post (for the page linked above):
http://s87841630.onlinehome.us/forum/vi ... ?p=482#482

essentially the post(s) would contain:
<codename> motherboard as the topic title with a link to the appropriate page. The pages are all in the "model" folder, but the subfolders vary...
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby MoboCop » Mon Nov 15, 2004 1:05 am

Toby B. wrote:
MoboCop wrote:ok none of those forum posts exist. Please make a forum post exactly like you want it refering to an html page. I need to see it, please.


ok, sorry about that...

Sample ASPEN2 post (for the page linked above):
http://s87841630.onlinehome.us/forum/vi ... ?p=482#482

essentially the post(s) would contain:
<codename> motherboard as the topic title with a link to the appropriate page. The pages are all in the "model" folder, but the subfolders vary...


From what I know so far.

1) using php file functions build an array with all the pages you want to link to.
2) use a foreach statement to cycle through array
3) on each pass build your subject and content data using the array you built. For example for the subject strip the .html from the value and add a space and the word Motherboard. For your content value add the root of your url to the array value http://s87841630.onlinehome.us/model/aspen/ + aspen.html
4) call insert post on each pass using the parameters you make in step 3 above.
5) grab the result value on each pass from insert post and build an array of topic ideas - pair this with the value from your first array so you have aspen.html -> 120. This will alllow you to go back and use a foreach to update your html pages with the topic id.
6) use foreach, the array from step 5 and the file functions to update your html pages.

This again is fairly generic but should get you pointed in the right direction.
Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstien
MoboCop
Drunken Master
 
Posts: 8854
Joined: Tue Jan 18, 2000 1:01 am
Location: Fresno

PreviousNext

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest