Current time: 05-22-2012, 11:48 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 8 Votes - 3.13 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating Custom MyCode
08-13-2008, 08:54 PM
Post: #71
RE: Creating Custom MyCode
Need help with part this part of the code:

FlashVars="viewkey=8616c1559ab4221b3910"

the actual link leads to a hidden .flv file.

8616c1559ab4221b3910/127544.flv&viewkey=8616c1559ab4221b3910

how do I create the replacement to include the hidden stuff on a webpage?
Find all posts by this user
Quote this message in a reply
08-13-2008, 08:58 PM
Post: #72
RE: Creating Custom MyCode
(07-06-2008 11:33 AM)lifeguard Wrote:  Ok, thnx Lex!
Is there some MYcode, for google?

So when a user post [google]Mybb[/google], Mybb is a clickable link to googlesearch?

Here is the my Google Mycode. you can use it:

\[google\](.*?)\[/google\]

replacement:

<a href="http://www.google.com/search?q=$1&sourceid=ie7&rls=com.microsoft:en-US&ie=utf8&oe=utf8">$1</a>

Enjoy. Wink
Find all posts by this user
Quote this message in a reply
08-14-2008, 06:35 PM
Post: #73
RE: Creating Custom MyCode
(08-09-2008 03:28 PM)primster7 Wrote:  
(08-09-2008 02:32 PM)imei Wrote:  
(08-08-2008 06:05 AM)primster7 Wrote:  How can I get java script to work with mycode?

I heard that as a default mybb changed the script code to something else.

Is there a workaround that is still secure?

As a security prevention manner, it strongly recommended that any JS related things should not be made with user outputs unless it properly and accurately validated. So I also recommend you to leave this feature unless you knew that what are you doing.

I'm willing to take the chance. How do I get around this and get javascript to work in a post?
PTRN:\[script\](.*?)\[/script\]
RPLCMNT:<script>$1</script>
IT IS NOT SECURE AND STRONGLY RECOMMENDED NOT TO USE IT.

(08-13-2008 08:54 PM)primster7 Wrote:  Need help with part this part of the code:

FlashVars="viewkey=8616c1559ab4221b3910"

the actual link leads to a hidden .flv file.

8616c1559ab4221b3910/127544.flv&viewkey=8616c1559ab4221b3910

how do I create the replacement to include the hidden stuff on a webpage?
need more info please.

[Image: header.jpg]
ُPersian MyBBoard , Translations, Plugins , Mods, Themes, Templates,...
Visit this user's website Find all posts by this user
Quote this message in a reply
08-14-2008, 06:42 PM
Post: #74
RE: Creating Custom MyCode
Imei - I sent you a PM.
Find all posts by this user
Quote this message in a reply
10-20-2008, 10:10 PM (This post was last modified: 10-20-2008 11:42 PM by seeker.)
Post: #75
RE: Creating Custom MyCode
This thread helps..
Can someone please, show any example of using an 'available' MyBB variable in custom MyCode?

Thank you

Edit: Can't be done / requires a plugin.

#
MyBB is the best forum software! Exclamation
##
Find all posts by this user
Quote this message in a reply
09-05-2009, 03:05 AM (This post was last modified: 09-05-2009 03:53 AM by GraphiX2004.)
Post: #76
RE: Creating Custom MyCode
Quick question here's an example

\[codebox\](.*?)\[/codebox\]

that works fine but strange enough so does the following
on all internet browsers

\[codebox\](.*?)\[/codebox] <-- without the extra \]

Why is it necessary to have the extra \ on the end if
everything works across all browsers like the above?

test yourself full code

\[codebox\](.*?)\[/codebox]

In fact this also works perfectly

\[codebox\](.*)\[/codebox]

<p style="border: 1px solid black; width: 200px;">$1 </p>

can someone let me know what this extra \ does?
someone in the previous posts i think page 5 was asking how to use mycode as a table

\[table\](.*?)\[/table\]

<table class= or id= [your selector for table design]>
<tr>
<td>$1</td>
</tr>
</table>

if you like to do it the correct way then use thead tbody tfoot but i never have.
Find all posts by this user
Quote this message in a reply
01-12-2010, 04:31 PM
Post: #77
RE: Creating Custom MyCode
Is it possible to have some PHP code as replacement with the current form? and if not, how I can do this myself?

Basically what I want to do is this:

[sp8][/sp]

If there's and 8 there print Series 8, and if it's only [sp][/sp] don't print the Series bit, i've tried doing this with regex, but no luck, and it could easily be done with PHP.

Thanks.

Drunkr | Spooks Forum
Find all posts by this user
Quote this message in a reply
04-27-2010, 10:30 AM
Post: #78
RE: Creating Custom MyCode
Bump, but as this was referred to, and people may be using this, I would like to mention that the "(.*?)" regular expression can be rather dangerous if not used correctly.
I specifically made the following plugin to help people make "proper" expressions without compromising security:
http://mybbhacks.zingaburga.com/showthread.php?tid=269

Hopefully MyBB will have something similar in the future.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-26-2010, 11:42 PM
Post: #79
RE: Creating Custom MyCode
(04-27-2010 10:30 AM)Yumi Wrote:  Bump, but as this was referred to, and people may be using this, I would like to mention that the "(.*?)" regular expression can be rather dangerous if not used correctly.
I specifically made the following plugin to help people make "proper" expressions without compromising security:
http://mybbhacks.zingaburga.com/showthread.php?tid=269

Hopefully MyBB will have something similar in the future.

Awesome...thank you so much Yumi !

[Image: arcbanner.png]
Download and get support for ARC - http://www.goarc.org
Visit this user's website Find all posts by this user
Quote this message in a reply
09-23-2011, 09:32 PM
Post: #80
RE: Creating Custom MyCode
Sorry if this is too old a thread to post in, but it seemed the right nplace?

I've been using a custom bbcode in phpBB to wrap text around images in posts which works brilliantly!
I tried to rewrite the bbcode to suit MyCode but not having any luck.

Could someone help?

This is the working bbcode in phpBB..

Regular expression:
Code:
[imgwrap={TEXT1}]{TEXT2}[/imgwrap]
Replacement:
Code:
<div style="float:{TEXT1};margin: 2px 2px 6px 6px;"><img src="{TEXT2}"></div>

So in MyBB I have tried this..

Regular expression:
Code:
\[imgwrap=(.*?)\](.*?)\[/imgwrap\]
Replacement:
Code:
<div style="float:$1;margin: 2px 2px 6px 6px;"><img src="$2"></div>

But, no luck.
What have I missed?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication