
See you there

-e
xoops_cp_header(); // For default
xoops_cp_header('/modulename/file.js'); // Adds a file
xoops_cp_header(array('/modulename/file1.js','/modulename/file2.js')); // Includes two, etc. files
j a v a s c r i p t:if(navigator.userAgent.indexOf('Safari' >= 0){
Q=getSelection();
}else{
Q=document.selection
?document.selection.createRange().text
:window.getSelection();
}
void(window.open(
'http://my.xoops.site/modules/mylinks/index.php'
+'?op=linksConfigMenu'
+'&popuptext='+escape(Q)
+'&popupurl='+escape(location.href)
+'&popuptitle='+escape(document.title),
'xoops bookmarklet',
'scrollbars=yes,
width=600,
height=460,
left=100,
top=150,
status=yes'));
echo "";
echo "right" nowrap>"._MD_SITEURL." ";
echo "http://">";
echo " ";
echo "right" nowrap>"._MD_CATEGORYC." ";
$mytree->makeMySelBox("title", "title");
echo "right" valign="top" nowrap>"._MD_DESCRIPTIONC." n";
xoopsCodeTarea("description",60,8); with: echo ".$_GET['popuptitle'].">"; /* CHANGE */
echo "
right" nowrap>"._MD_SITEURL." ";
echo "$_GET['popupurl']."">"; /* CHANGE */
echo " ";
echo "right" nowrap>"._MD_CATEGORYC." ";
$mytree->makeMySelBox("title", "title");
echo "right" valign="top" nowrap>"._MD_DESCRIPTIONC." n";
xoopsCodeTarea("description",60,8,null,stripslashes($_GET['popuptext'])); /* CHANGE */
Passing the selected text involves modifying file /include/xoopscode.php, adding a $textarea_content parameter: function xoopsCodeTarea($textarea_id, $cols=60, $rows=15, $suffix=null, $textarea_content='')
then replacing (around line 72): $areacontent = isset( $GLOBALS[$textarea_id] ) ? $GLOBALS[$textarea_id] : '';
with: $areacontent = isset( $GLOBALS[$textarea_id] ) ? $GLOBALS[$textarea_id] : $textarea_content;
Presumably, no one would even be able to access the admin add/modify links page without having signed in with proper admin credentials, but I would appreciate if you'd put in your 2 cents and let me know whether the above hack introduces vulnerability.
Thanks,
Eric
P.S. Code wasn't tested under Safari.
19
Thanks, Dave.
Well, then do you think modifying httpd.conf to include the xoopsheadlines module might work as a quick solution?
<Directory "/home/user/htdocs/public_html/modules/xoopsheadline">
php_admin_flag allow_url_fopen on
Directory>
From looking at the docs, I doubt fsockopen() would behave differently than file() when the allow_url_fopen flag is off...
[Edit: mentioned httpd.conf for clarity]
20
In essence, all that would be needed would be to start the PHP code in file /modules/xoopsheadline/class/headlinerenderer.php with the line:
ini_set("allow_url_fopen", "1");
If the code is written well enough below that (i.e. makes sure there's no tampering possible with the list of feed urls fed into the file() method), that should be the only change necessary.
Login
Search
Recent Posts
Who's Online
Donat-O-Meter
Latest GitHub Commits