NukeXchange Network

          

Nuke Sites Link Directory
Nuke Fixes · NukeForums · NukeZone Hosting · NukeUnited · Nuke Sites · Nuke Skins · NukeLance
Nuke Resources
 :: Home  :: Downloads  :: Your Account  :: Forums  :: Advertise :: 
Login or Register
Main Menu
General
 Main
 AvantGo
 Banner_Clients
 cfaq
 Donations
 Downloads
 Forums
 Members_List
 Private_Messages
 Search
 Stories_Archive
 Submit_News
 Surveys
 Topics
 Web_Links
 Your_Account

Your Account
 Login
 Register
 Lost Pass

Modules
Quick Links
· CMS Focus
· Domain Names
. Game Quest
· Learning Linux
. MateMaker
· NukeFixes
· NukeForums
· NukeLance
· Nuke Sites
· Nuke Skins
· NukeZone Hosting
. SearchDevil
Other Options

Download Resources
· Nuke Downloads
· Add a Link
· New Files
· Top Rated
· Most Popular

Web Site Resources
· Nuke Sites
· Add A Site
· New Sites
· Top Rated
· Most Popular

Support
· NukeZone Hosting
· NukeSkins.com
· NukeForums.com
· phpnuke.org
· NukeFixes.com
Information
NukeForums
·PHPNuke 8 security worries
·PHP-Nuke SQL Injection Vulnerability Fix
·decompressing EN-Book-Nuke.tar.tar
·How to allow spaces/gaps/"-" in allowed usernames
·How to Setup PHPNUKE on win2k
·cannot save changes
·voting?
·Nuke forum picture problem
·How to change smtp port on wampserver and windows
·yet another 301 redirect problem

read more...
Top10 Links
· 1: Nuke Forums
· 2: PHPNukeFiles
· 3: NukeSkins
· 4: Nuke Templates
· 5: EcomJunk
· 6: MDesign
· 7: Windows Installation: PHP
· 8: FLASH-FOR-NUKE
· 9: Dezina
· 10: Global Dream News Sharing Portal!
Site Visitors
User Login:

Nickname:
Password:
Security Code: Security Code
Type Security Code Here:

Members List Membership:
Latest: tones
Today: 1
Yesterday: 2
Overall: 15105

Visitation:
Guests: 461
Members: 0
Total: 461


You are Anonymous user. You can register for free by clicking here
Sponsor Links
php-Nuke Themes and Templates
php-Nuke Themes and Templates

NukeResources :: View topic - links in custom block not working and topic link problems
NukeResources Forum Index

NukeResources Forum Index -> Random Thoughts -> links in custom block not working and topic link problems
Post new topic  Reply to topic    View previous topic :: View next topic 
links in custom block not working and topic link problems
PostPosted: Mon May 15, 2006 3:10 pm Reply with quote
varan619
Resource Seeker
Resource Seeker
 
Joined: May 10, 2006
Posts: 10




I'm trying to add links to custom blocks on my nuke site. Running 7.7. Using the admin interface to create custom blocks. Every link I've created, the destination is ignored and the link just redirects to the root of my site. When I return to the block editor, the link I defined is removed just leaving behind empty quotes.

Here's examples of my code (genericized).

Example 1:
Code:
Contact the <a href="mailto:webmaster@mysite.com">Webmaster</a>


Result - "Webmaster" links to http://www.mysite.com

Example 2:
Code:
<B> webmaster </b> who writes  this book manages the following sites: <b ><br>
<a href="http://www.spaghettibrain.com">spaghettibrain.com</a>
<a href ="http://www.claudioerba.com">claudioerba.com</a>


Result - Code taken directly from the PHPNUKE HOWTO. Result is "spaghettibrain.com" links to http://www.mysite.com

Example 3:

Code:
<p>Visit the following sites</p><p><a href="http://www.website1.com/"><img src="http://www.mysite.com/images/content/image1.jpg"></a></p><p><a href="http://www.website2.com/"><img src="http://www.mysite.com/images/content/image2.jpg"></a></p><p><a href="http://www.website3.com"><img src="http://www.mysite.com/images/content/image3.jpg"></a></p>


Result - I had to add "img" to allowable HTML in my config.php to get images to appear and now they do. However, the images all link to http://www.mysite.com.

Anyone know how to resolve this?


Last edited by varan619 on Sun May 21, 2006 12:52 am; edited 1 time in total
View user's profile Send private message
PostPosted: Mon May 15, 2006 10:02 pm Reply with quote
darklord
Resourceful
Resourceful
 
Joined: Feb 25, 2006
Posts: 210




ok now remember php and html dont like eachother without a buffer command such as content or echo.

but just for the hell of it..try makin all ur quotes look like this \"
the backslash should make all the code workable.

_________________

for those who STAND shall NEVER fall and those who fall shall rise once more...never give up the end is just another beginning.
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
PostPosted: Tue May 16, 2006 3:31 am Reply with quote
varan619
Resource Seeker
Resource Seeker
 
Joined: May 10, 2006
Posts: 10




That didn't work.

I try to understand how to make blocks following the instructions in the PHPNUKE HOWTO but it doesn't work.

Code:
<?php
if (eregi("block-hits.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
$content  =  ......


When I start with that, my end result is visible $content and stuff around my images with incorrect links to my homepage. I tried to create a block-.php file from scratch and I just get an empty block. The instructions in the HOWTO, like the "remember" statement made above, I believe, assume an existing amount of knowledge that I do not possess.

What frustrates me most is that I have two websites running 7.7 and I can create a custom block on one using HTML and the link to an external destination works fine. I use the same exact code to my second site and it fails.

Therefore, I figure instead of trying radically new ways of making the block that there must be some config setting somewhere else that is causing my problem. Possibly in the theme somewhere as that is the essential difference between my two sites.
View user's profile Send private message
PostPosted: Tue May 16, 2006 5:26 am Reply with quote
varan619
Resource Seeker
Resource Seeker
 
Joined: May 10, 2006
Posts: 10




Ok, so I downloaded an affiliates block from Nuke Cops and modified it. Have made some progress... Here's my code.

http://www.digitalpickles.com/paul/code.jpg

Good news is that when I hover over my images it displays the correct destinations and the alt text displays. However, when I click on the images, nothing happens. I tested the block I downloaded which includes a preset example and the same problem.

Sigh... Just having all kinds of problems. Despite the fact that I tried using the code tag, when I try to submit this post, I get the error "The html tags you attempted to use are not allowed." So I uploaded my code as an image instead.


Last edited by varan619 on Wed May 17, 2006 12:57 am; edited 1 time in total
View user's profile Send private message
PostPosted: Tue May 16, 2006 6:41 pm Reply with quote
varan619
Resource Seeker
Resource Seeker
 
Joined: May 10, 2006
Posts: 10




also,

right-click - "Open Link in New Window works fine.

Works fine from Firefox.
View user's profile Send private message
PostPosted: Tue May 16, 2006 10:24 pm Reply with quote
darklord
Resourceful
Resourceful
 
Joined: Feb 25, 2006
Posts: 210




change the input type=image to just img so ur link is img src=\"http....

other then that...i see nothing particualrly wrong with the code.
but more eyes the better.

_________________

for those who STAND shall NEVER fall and those who fall shall rise once more...never give up the end is just another beginning.
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
PostPosted: Tue May 16, 2006 10:54 pm Reply with quote
varan619
Resource Seeker
Resource Seeker
 
Joined: May 10, 2006
Posts: 10




That made it worse. Result was my images became empty cells with a cursor. The images display fine.

Also, I ultimately want the links to open in new windows but I don't know how to incorporate the target="_blank" into my code. I tried sticking where it would go in HTML world and that didn't work.

The other problem I'm having with my site which may or may not be related is that my topic icons are messed up. They are fine in the admin panel but my articles end up looking in the root directory of my site for the images.
View user's profile Send private message
PostPosted: Wed May 17, 2006 12:04 am Reply with quote
darklord
Resourceful
Resourceful
 
Joined: Feb 25, 2006
Posts: 210




ok this is not workin...here look at this code

http://darklords-lair.com/test.html

now i got another person linked there for another block so look at the affiliates part...ull see it

thats got my button on it but copy that line and edit it to fit ur stuff..it works..i know it does

_________________

for those who STAND shall NEVER fall and those who fall shall rise once more...never give up the end is just another beginning.
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
PostPosted: Wed May 17, 2006 12:44 am Reply with quote
varan619
Resource Seeker
Resource Seeker
 
Joined: May 10, 2006
Posts: 10




Fantastic! That code worked. That block is 100% good to go. Thank you very much. I left a commented credit to you in the code.

I still have my underlying problem which I believe may be the source of all other evil. Going back to the first example in my OP (second example resolved).

1. I have a simple block called Disclaimer and at the end of my disclaimer text I want to put a link to contact the webmaster.

Code:
Contact the <a href="mailto:webmaster@mysite.com">Webmaster</a>


Result is that Webmaster links to http://www.mysite.com and when I return to the edit screen for the block the code has been altered to:

Code:
Contact the <a href="">Webmaster</a>


2. News is looking to the root directory (http://www.mysite.com) for my topic images. The path to my images works fine in the admin panel when I'm in the topics manager. But when I create an article and select the topic, the end result is a red x image.

Now I can bandage the red x of course by placing the images in the root directory of my site but there is part 2 to this problem.

The link of the topic image is http://www.mysite.com/search.php?query=&topic=2. When I click on the image, instead of getting a list of articles in that topic, I get the following error:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.

Now when I look at my other website which is also running phpnuke 7.7 (albeit unpatched), the image link is http://www.myothersite.com/modules.php?name=News&new_topic=2

If I simply copy that to my address bar and change myothersite to mysite, it gives me the intended result.

So my questions:

1. There seems to be some setting somewhere that is overiding specified locations and defaulting them to http://www.mysite.com (the root of my site). Where could this be?

2. Where can I redefine the link attached to my topic images in my news articles so that it uses modules.php instead of search.php.
View user's profile Send private message
PostPosted: Wed May 17, 2006 3:08 am Reply with quote
darklord
Resourceful
Resourceful
 
Joined: Feb 25, 2006
Posts: 210




whoa ho ho ho...Laughing
u got a lot of promblems...lets hit this one at a time...pm me on yahoo and ill help u out.

_________________

for those who STAND shall NEVER fall and those who fall shall rise once more...never give up the end is just another beginning.
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
PostPosted: Sun May 21, 2006 12:52 am Reply with quote
varan619
Resource Seeker
Resource Seeker
 
Joined: May 10, 2006
Posts: 10




I know more today than I did yesterday...

And my understanding allowed me to find the solution to both of my problems.

varan619 wrote:
News is looking to the root directory (http://www.mysite.com) for my topic images. The path to my images works fine in the admin panel when I'm in the topics manager. But when I create an article and select the topic, the end result is a red x image.

1. There seems to be some setting somewhere that is overiding specified locations and defaulting them to http://www.mysite.com (the root of my site). Where could this be?


This is determined by the $tipath variable which is set in mainfile.php.

Code:
$tipath = "images/topics/"


This entry was missing from my mainfile.php due to the fact that is missing from the mainfile.php that is included with 77patched3dot2.

varan619 wrote:
The link of the topic image is http://www.mysite.com/search.php?query=&topic=2. When I click on the image, instead of getting a list of articles in that topic, I get the following error:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.

Now when I look at my other website which is also running phpnuke 7.7 (albeit unpatched), the image link is http://www.myothersite.com/modules.php?name=News&new_topic=2

If I simply copy that to my address bar and change myothersite to mysite, it gives me the intended result.

So my questions:

2. Where can I redefine the link attached to my topic images in my news articles so that it uses modules.php instead of search.php.


This problem was being caused by my theme XP Midnight. In the theme.php file:

Lines 244 and 314

Code:
<a href=\"search.php?query=&amp;topic=$topic\">


I changed both to

Code:
<a href=\"modules.php?name=News&new_topic=$topic\">


Likely, anyone who installs Nuke 7.7 with patch 3dot2 and the XPMidnight theme would run into these same problems so hopefully their google query will bring them here.
View user's profile Send private message
PostPosted: Sun May 21, 2006 3:08 am Reply with quote
darklord
Resourceful
Resourceful
 
Joined: Feb 25, 2006
Posts: 210




topic path should be set in config.php..if im not mistakin...and check the compatibility of ur theme be4 u upload it...i doub thats the end of ur problems with ur theme.

_________________

for those who STAND shall NEVER fall and those who fall shall rise once more...never give up the end is just another beginning.
View user's profile Send private message Send e-mail