Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 17 Aug 2012, 02:53
Easy5s.net Easy5s.net is offline
 
Join Date: Jun 2011
How to str_replace in vb4

I use a code for VB3 and I want to convert it to work on vb4.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

thank.
Reply With Quote
  #2  
Old 17 Aug 2012, 17:21
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Originally Posted by Easy5s.net View Post
I use a code for VB3 and I want to convert it to work on vb4.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

thank.
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

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View 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
Reply With Quote
  #3  
Old 17 Aug 2012, 17:33
Badshah93's Avatar
Badshah93 Badshah93 is offline
 
Join Date: Jun 2010
Real name: Aayush Agrawal
in vB 4


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #4  
Old 17 Aug 2012, 17:44
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Edit: what badshah posted above is obviously simpler and will work if you haven't used any variables from the newthread template.
Reply With Quote
  #5  
Old 21 Aug 2012, 05:56
Easy5s.net Easy5s.net is offline
 
Join Date: Jun 2011
thank all but <!-- message area --> not in the temp newthread of the vB4 which only vbb3
Reply With Quote
  #6  
Old 21 Aug 2012, 13:51
ChiNa ChiNa is offline
 
Join Date: Jul 2012
Real name: CM
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
Reply With Quote
  #7  
Old 21 Aug 2012, 14:03
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Originally Posted by Easy5s.net View Post
thank all but <!-- message area --> not in the temp newthread of the vB4 which only vbb3

You could try this: change the hook location to newthread_form_complete and use this code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #8  
Old 21 Aug 2012, 14:09
Easy5s.net Easy5s.net is offline
 
Join Date: Jun 2011
Originally Posted by kh99 View Post
You could try this: change the hook location to newthread_form_complete and use this code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
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".
Reply With Quote
  #9  
Old 21 Aug 2012, 14:14
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
That's ok, you'd probably want to wait to see if it works.
Reply With Quote
  #10  
Old 21 Aug 2012, 14:28
Easy5s.net Easy5s.net is offline
 
Join Date: Jun 2011
Originally Posted by kh99 View Post
That's ok, you'd probably want to wait to see if it works.
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"
Reply With Quote
  #11  
Old 21 Aug 2012, 15:01
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
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.
Reply With Quote
  #12  
Old 21 Aug 2012, 15:22
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Originally Posted by Easy5s.net View Post
Ok, it works, thank you again, but why I can not click like for you?
I believe it's to prevent abuse - without that limitation you could just "like" every post someone has ever made.


Originally Posted by Scanu View Post
i think this always happens with Kevin because all of his posts are helpful.
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.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 02:16.

Layout Options | Width: Wide Color: