Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Metamod change php code
Metamod change php code
Metamod change php code
Good Morning,
I joomla 1.5.21 and 2.5 Metamod , I'm trying to change all the php code inside a module , but it seems that these changes are not considered. There is a place where the code php is stored and where i can modify directly. Thanks for Help
Re: Metamod change php code
Hi dairuin77,
I'm afraid I don't understand what you are trying to achieve, and what the problem is. Can you please be more specific?
Thanks,
Stephen
Re: Metamod change php code
Sorry maybe with an example it s more clear, inside in my metamod module i have this php code:
echo "<p style='text-align: center;'><img src='images/stories/customercare.jpg' border='0' /></p>";
if($user->usertype != ""){
echo "<p style='text-align: center;'><strong>+39 0523 9528<span style='color:#ef3f3f;'>27</span> <span style='font-size: 11px;'><em>Help Desk</em></span></strong></p>";
echo "
<table border='0'>
<tbody>
<tr>
<td>
<p style='text-align: center;'><a href='dmdocuments/xxxxxxxx_ presentation.exe'><img src='images/stories/xxxxx.png' border='0' alt='team viewer' /></a></p>
</td>
<td>
<span style='font-size: 11px;'><em><strong>Web Demo access</strong></em></span>
</td>
</tr>
<tr>
<td>
<p style='text-align: center;'><a href='dmdocuments/xxxxxxx.exe'><img src='images/stories/xxxxxxx.png' border='0' alt='xxxxxxx' /></a></p>
</td>
<td>
<span style='font-size: 11px;'><em><strong>Software Support</strong></em></span>
</td>
</tr>
<tr>
<td>
<p style='text-align: center;'><a href='ftp://ftp.xxxxxxxxxx/' target='_blank'><img src='images/stories/ftp.png' border='0' alt='ftp' /></a></p>
</td>
<td>
<span style='font-size: 11px;'><em><strong>FTP Access</strong></em></span>
</td>
</tr>
<tr>
<td>
<p style='text-align: center;'><a href='index.php?option=com_chronocontact&Itemid=85' target='_self'><img src='images/stories/hrf.png' border='0' alt='HRF' /></a></p>
</td>
<td>
<span style='font-size: 11px;'><em><strong>Help Request Form</strong></em></span>
</td>
</tr>
</tbody>
</table>";
}else{
echo "
<table border='0'>
<tbody>
<tr>
<td>
<p style='text-align: center;'><a href='ftp://ftp.xxxxxxxxxx/' target='_blank'><img src='images/stories/ftp.png' border='0' alt='ftp' /></a></p>
</td>
<td>
<span style='font-size: 11px;'><em><strong>FTP Access</strong></em></span>
</td>
</tr>
<tr>
<td>
<p style='text-align: center;'><a href='index.php?option=com_content&view=article&id=62&Itemid=143' target='_self'><img src='images/stories/sbu.png' border='0' alt='SBU' /></a></p>
</td>
<td>
<span style='font-size: 11px;'><em><strong>Find Your xxxxxxxxx</strong></em></span>
</td>
</tr>
</tbody>
</table>";
}//fine else
So if i try to change for example the download of "xxxxxxxx_ presentation.exe" with "xy.exe" nothing happen on the website i can only download "xxxxxxxx_ presentation.exe"
Re: Metamod change php code
Ok, so I think you are saying that Joomla is not allowing you to save any alterations you make to the PHP code in the PHP box, right?
That's pretty unusual behaviour, but I have seen something similar when there are security extensions installed in PHP that try to detect malicious content being sent to the server. It looks like that could be happening here. Perhaps what you could do is to split up the string with some PHP code, so instead of this (as it is now):
<p style='text-align: center;'><a href='dmdocuments/xxxxxxxx_ presentation.exe'><img src='images/stories/xxxxx.png' border='0' alt='team viewer' /></a></p>
... you could break it up a bit and do this:
<p style='text-align: center;'><a href='" . "xy." . "exe'><img src='images/stories/xxxxx.png' border='0' alt='team viewer' /></a></p>
Could you try that and see if it works?
Cheers,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Metamod change php code
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5941
- Posts this week:
- 1
- User Info:
- Total Users:
- 7618
- Newest User:
- goure1dhowen
- Members Online:
- 0
- Guests Online:
- 135
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked