2010-03-28, 18:51:59
Lines 81, 82, 85 and 86 of the plugin file (simple-random.php) tell the page what to display. As an example, if we take the quote as the title (because it’s unique) and the author as the description we would want to display title first. This means lines 85 and 86 are the ones we’ll be using.
Let’s put some quotation marks around the quote and a dash before the author:
The same goes for italics:
Now if you have written It’s hard to beat somebody when they don’t give up. as the title of some random content, and gave it a description Babe Ruth, simple_random_display() will output the following HTML:
Hope you understood, you can add any HTML you want!
Code:
echo htmlspecialchars_decode((string)$data_edit->content[$random_number]->contenttitle[0]);
echo htmlspecialchars_decode((string)$data_edit->content[$random_number]->contentinformation[0]);
Code:
echo "“".htmlspecialchars_decode((string)$data_edit->content[$random_number]->contenttitle[0])."â€Â";
echo " - ".htmlspecialchars_decode((string)$data_edit->content[$random_number]->contentinformation[0]);
Code:
echo "“<i>".htmlspecialchars_decode((string)$data_edit->content[$random_number]->contenttitle[0])."</i>â€Â";
echo " - ".htmlspecialchars_decode((string)$data_edit->content[$random_number]->contentinformation[0]);
Code:
“<i>It’s hard to beat somebody when they don’t give up.</i>†- Babe Ruth
Hope you understood, you can add any HTML you want!
“Don’t forget the important ˚ (not °) on the a,†says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!