![]() |
|
Thread Tools |
#1
|
||||
|
||||
How to str_replace in vb4
I use a code for VB3 and I want to convert it to work on vb4.
thank. No members have liked this post.
|
#2
|
||||||||
|
||||||||
Originally Posted by Easy5s.net
I never code for vb3 so i don't know that code is doing, however the generic code for str_replace on vb4 is easy you should use this code![]()
Instead if you're trying to add some codes to the begin or to the end of a template, the code will looks differently
__________________
http://twitter.com/scanu_account The following members like this post: Easy5s.net
|
#3
|
||||
|
||||
The following members like this post: Easy5s.net
|
#4
|
||||
|
||||
The problem is that in vb3, templates were stored as if they were a php double quoted string without the quotes, so you could just replace part of one cached template with another entire template. In vb4, they're stored as php code that when eval()'d sets the $final_rendered variable to the html string to be output. So if you think about that, just inserting another template doesn't work - you end up with invalid php code.
In any case, you could try this:
Edit: what badshah posted above is obviously simpler and will work if you haven't used any variables from the newthread template. No members have liked this post.
|
#5
|
|||
|
|||
thank all but <!-- message area --> not in the temp newthread of the vB4 which only vbb3
No members have liked this post.
|
#6
|
|||
|
|||
Very helpfull, Thank you all of you for answering, I have learned a lot on this one!
__________________
I am having a little break from vB Developing. I am trying to finish my PHP and MYSQL courses for now. I will answer all my PM's if anyone needed help for my products, but only when I can be online on vB.org. Its great to see new and old developers keeping vB.org alive! Thank you all for your support!CM
No members have liked this post.
|
#7
|
||||
|
||||
Originally Posted by Easy5s.net
![]()
You could try this: change the hook location to newthread_form_complete and use this code:
No members have liked this post.
|
#8
|
||||
|
||||
Originally Posted by kh99
Ok, I will try, thank you. And I can not click like for you because it is the message:![]()
"You must 'Like' someone else's post before liking any more by kh99". No members have liked this post.
|
#9
|
|||
|
|||
That's ok, you'd probably want to wait to see if it works.
![]() No members have liked this post.
|
#10
|
|||
|
|||
Ok, it works, thank you again, but why I can not click like for you?
"You must 'Like' someone else's post before liking any more by kh99" No members have liked this post.
|
#11
|
||||
|
||||
Because you can't like Like his posts 2 times in a row, you have to like someone else's post before like on one of his posts, i think this always happens with Kevin because all of his posts are helpful.
__________________
http://twitter.com/scanu_account No members have liked this post.
|
#12
|
|||
|
|||
Originally Posted by Easy5s.net
I believe it's to prevent abuse - without that limitation you could just "like" every post someone has ever made.![]()
Originally Posted by Scanu
Thanks, but to be fair a lot of people are helpful here. I think it's just that I spend so much time here that I occasionally end up helping the same person a few times in a row. ![]()
![]() The following members like this post: Scanu
|
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 02:16.