![]() |
Quote:
Anyone got any ideas for me to check out? |
Go back to the last post I made with the full code in it. Does that work on both sites?
|
Quote:
|
Damn. If its not one thing its another. Now, even though I have explicitly names the username and fetched all the bbuserinfo data manually...my script is posting as random members.
Main difference right now is I have vbcron running the script once an hour. Maybe vbcron is the problem. |
I'd copy the code exactly to a test file, run that a couple of times. If it does it correctly each time, then it's probably vbcron.
|
Quote:
Eggdrop bot keeps log of the channel. Every day I am going to pour through that log and post the contents in a specific forum. Now, I didnt want each day to be just one post as that could get quite large, so I am saying every 100 lines post a new post. Now, the problem is that the posts are not inserted in line! The first post which is the subject post is sometimes located in the middle of the thread created by the script. It should be te first post. Its called before I even start looping through the file and posting the 100 line posts. I cant figure it out. |
Not sure, perhaps posting some code would help?
Does anyone know of a way of auto-creating a forum, other than a normal mySQL command? Looking for the vB function, if it exists. |
PHP Code:
And dont make fun of my chicken scratch code! It always look horrible before it is refined! :nervous: |
Does any one have a suggestion as to how to use this new method of having an automatic post to a forum to post a welcome message to a new user when the register (preferably after they activate their account)? I was using the hack at https://vborg.vbsupport.ru/showthrea...threadid=35398 for 2.x but haven't been able to modify it for 3.x
Thanks in advance!!! |
You could just set it to a Welcome Forum, and have the script be something like "Welcome ".$username." to this site"
|
This thread has been very helpful, though I am having some trouble. Here is the my current code:
PHP Code:
Also, this is all done mid template on our site, and all the variables pre-defined at the top of the script are unset after this. Any info appreciated. |
That is too bad :(
|
i would love something like this based on
if posts on the forums in XX hours < XX then create thread |
I am also having problems creating posts... here is my code:
PHP Code:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /usr/local/www/htdocs/bbs/includes/init.php on line 517 Fatal error: Call to a member function query_first() on a non-object in /usr/local/www/htdocs/bbs/includes/functions.php on line 922 Any help is appreciated, kind of lost here. Thanks! |
Might be
PHP Code:
|
yep fixed that and i think it would have complained about not being able to find the file... still not working. Maybe something in the data I am passing to it, hmm
|
tried passing it vanilla test data, to no avail. I am logged into the forum and that got rid of one of the errors, but now all I get is:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /usr/local/www/htdocs/bbs/includes/init.php on line 517 I checked init.php and it is trying to merge an array it just created and $specialtemplates, which appears to not be defined. This is a dev environment, maybe we are missing some templates? |
has this been released properly?
|
released properly? I upgraded properly if thats what you mean, to 3.0.3
|
i mean did i get released via the releases forum here at vb.org?
|
Uhhh...no...
|
no, I just copied code from earlier in this thread.. still getting that wierd error even with test data.. still workin on it though.
|
Hi,
just tested the following code: PHP Code:
|
Quote:
|
Sorry for the delay guys, never did release this as an official hack due to the lack of interest, seemed everyone except for me knew how to do this at the time. Man trying this stuff in the early RCs was a pain! Just switched to a newer license that won't expire, so I'll get all of the updates on the thread from now on :)
I'll have to re-read through the thread later (in class atm), but it sounds like at least sabret00the would like a variable system to set up to do this? I'll have to dig up the custom forms/code I made that used this function. Worked well, but the project went to ASP so I haven't looked at it in a while. Would've stayed in PHP if I knew how to radically customize the board templates. Would you guys want me to work this up and release it as an "official" hack? |
That would be great.
|
Ok, just re-read everything and looked at my code. Looks like I made the code at the end of page 2 into a function, as well as a function that auto-creates forums.
To release this as a hack, I'd like to put some safety features in it, e.g. some way of making a simple admin CP module for it (NO CLUE), and a way to enter it into group policies so that to have access to it you have to be in a special group. Perhaps it would show up in the User CP if said user is in this secondary group? So far, these are the requests for it that I have seen: Quote:
Quote:
Comments please! :) I'm about to fall asleep, so tomorrow afternoon (EST) I'll post the code as a beta hack. |
regarding the last bit, basically you'd have a form with
Code:
THREAD TITLE Quote:
|
Quote:
|
what do you mean by admin module?
|
One of the side menus in the admin section, a dropdown accessible only within that area.
|
Quote:
|
I used this code, IT actually adds the thread but i get the following warning
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in \global.php on line 329 Warning: Invalid argument supplied for foreach() in \includes\functions.php on line 2177 Also if the subject in the forum ID is send again then it just exits it doesn't flow through the code. Help :) Thanks, LOW LOW. Quote:
|
that's a problem with php5
before the require global.php add these lines: PHP Code:
|
Thanks for the quick help !
I have a small follow up. I know how to get the threadid, but how would i post a reply to that ID ? Do i put instead of the 0, you put the threadid (lets say 3212) ? example: build_new_post('thread', $foruminfo, array(), 3212, $post, $errors); |
I tried doing something like this ...
build_new_post('reply', $foruminfo, array(), 3212, $post, $errors); where 3212 is the thread i'm replying to, but it didn't work :( |
Ok i found how to do it
You need these added: $threadid=1091; // the thread you want to reply to $threadinfo = fetch_threadinfo($threadid); build_new_post('reply', $foruminfo, $threadinfo, $_POST['postid'], $post, $errors); |
Hi Guys,
It works fine when called independently from the rest of my code. I have a feeling that because my php site uses a database as well it gets confused to which database its refering to. How can i make sure that when i run the post thread section it looks at the VB db and after it reverts back to my db. ?? |
Use a different dbuser/pass for your application
|
doesnt work :(
I decided to use URL stream instead. |
All times are GMT. The time now is 04:17 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|