How to embed an HTML code in composer ?
-
@meetdilip Is that the only iFrame you wish to post? Or is their an iframe for individual items?
I could do something like
fkid=141229141866629212
to get the iFrame to display, assuming the ID is the only thing that changes. However do note that any user could do this to get their affiliate code in. Although I could possibly look into making sure it's admin only. -
This is from my affiliate account. I will post a few more samples for you evaluation. I guess it changes with every deal. It will be nice to allow only admin to add the code.
Horizonal bar :
<iframe src='http://www.flipkart.com/affiliate/displayWidget?affrid=WRID-141141282406034773' frameborder=0 height=90 width=728></iframe>
<iframe src='http://www.flipkart.com/affiliate/displayWidget?affrid=WRID-141229213124264046' frameborder=0 height=90 width=728></iframe>
Skyscraper :
<iframe src='http://www.flipkart.com/affiliate/displayWidget?affrid=WRID-141229221834379337' frameborder=0 height=600 width=160></iframe>
-
Haha looks like somebody is getting some upvotes on his entries from @meetdilip
-
Right, so I can't actually test this, as it appears that the iFrames only appear if you're on the allowed list of affiliate users, so I'm only getting a white box.
You can test it by going to your node_modules folder and typing
git clone https://github.com/a5mith/nodebb-plugin-flipkart-iframe.git
Activate it in your ACP, then restart your forum.
Then go to a topic and paste in the affiliate src link. (This bit:
http://www.flipkart.com/affiliate/displayWidget?affrid=WRID-141229213124264046
)Let me know if it displays. It should work, the code is valid, the iFrame just doesn't display for me.
-
@a_5mith said:
@meetdilip said:
Where is the option in ACP to activate ? I just used the first command.
If you're on the new style Admin panel, it's under Extend > Plugins.
There is only @Schamper 's Flipkart Affiliate plugin there. I tried CTRL + F and used keywords iframe and flipkart. No luck.
-
@meetdilip said:
@a_5mith said:
Something wrong
http://techiewiz.in/topic/70/lg-l-bello-android-smart-phone-price-in-india-rs-18-500/2
Your sites offline.
-
@a_5mith I'd propose
/<a href="(?:https?:\/\/)?(?:www\.)flipkart\.com\/affiliate\/displayWidget\?(?:[^"]*&)?affrid=([\w\-_]+).+<\/a>/ig
-
@meetdilip said:
@a_5mith said:
Your sites offline.
Try now please. New ACP is a buggy. It crashes NodeBB whenever I try restart. Have to start NodeBB again through terminal. Restart command never works.
The issue seems to be with the affiliate ID on the end of the URL caused by the flipkart affiliate plugin. The URL in the source has
&affid=ddealsing
on the end of it. Which my plugin isn't looking for.Looking into it.