[SOLVED] Questions (Technorati, front page and phpinclude)

If you're having questions about some aspect of Nucleus, use this forum.
DeathawaitsU
Posts: 17
Joined: Thu Aug 13, 2009 4:14 pm

[SOLVED] Questions (Technorati, front page and phpinclude)

Postby DeathawaitsU » Mon Aug 17, 2009 2:43 pm

Hi all,

i've recently set up a nucleus site for a friend and have a few problems which i need help with:

1. I want to change the front page, at the moment it goes to blog, i would like it to go to a special page (called Home) but after looking (and searching the forum) i cant find how to do it, any ideas?

2. I want to include information from an external site on another custom page, i tried <%phpinclude(http://www.mysite.com/blah.php)%> but it didnt seem to work, am i missing something?

3. I have installed technoratitags on the site but am having issues setting it up (to be honest the directions arent exactly clear), heres what i have done:

a) installed the plugin
b) added <%TechnoratiTags(localcloud)%> to the sidebar
c) created a skin called tags with the following code:

Code: Select all

<div id="page">
<div id="content">
<%TechnoratiTags(tagsearch)%>.
</div>

d) created a file called tags.php with the following code:

Code: Select all

<?php
$CONF = array();
$CONF['Self'] = '.';
 
include('./config.php');
 
selectSkin('tags'); // change this if your tag skin is not named tags....
selector();
?>

e) added the css to my main css file

My issues are that when i click on a tag in the sidebar (which i assume is supposed to show all posts with that tag) it just shows all posts and for some reason the header logo dissapears :/
Currently when i click a tag it points to technorati and i want it to point to the local site (i gather its something to do with the skin or template var, but its not clear enough for me to even have an idea where i should put it)
And lastly, obviously with the css the tags are supposed to display in different sizes, it doesnt, and im not sure why, i assume the plugin isnt looking in my css file but i dont know where to set this within the plugin, again, any ideas?

All help is appreciated. Thanks :)
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Mon Aug 17, 2009 4:27 pm

1. That's not easily done in the current version, but there's a function to make it easier in the upcoming 3.5 release. However, you may be able to trick it by one of these two techniques:

A. Modify main index skin part.

Instead of putting the special home content into a special skin part, put just the content part (not the head, header, sidebar, footer, etc...) into a file called home.inc in the folder for your skin (ie skins/default/).

Now in the Main Index skin part for your skin, in the admin area, replace the blog skin variable (eg <%blog(default/index,10)%>) with the following code:

Code: Select all

<%if(category)%>
   <%blog(default/index,10)%>
<%else%>
   <%parsedinclude(home.inc)%>
<%endif%>

Then there's no need for the special skin part, and you get the list of items on each category page, but the "home" page shows your special content instead of the list of all items in the blog.

B. Nevermind option B. It would entail too much complexity. Option B is now to wait for 3.5 at the end of the month, and then ask the question again (or you could volunteer to test the release candidate 2 now).

2. You are using the correct skinvariable, but I think phpinclude only works with local files. I just checked the code and it does restrict the including of urls. It looks like it was intended that you could include urls in part of the code, but in the end there's a conditional that verifies that the file exists and that isn't supported for url filenames. So you could create a blah.php file in the folder for your skin and include it using phpinclude (<%phpinclude(blah.php)%>). The file might look like:

Code: Select all

<?php
     include('http://www.mysite.com/blah.php');
?>

Also, I will look into whether it would be a good idea to forgo that file_exists check for filenames that are urls and slip that into 3.5 before the release.

3. Can't help you with that. I've never used the plugin. Try posting the question on this thread: http://nucleuscms.org/forum/viewtopic.php?t=15314
Is your question not solved yet?
Search our FAQ,
read the Documentation, or
browse the list of available plugins.

Check out my plugins
DeathawaitsU
Posts: 17
Joined: Thu Aug 13, 2009 4:14 pm

Postby DeathawaitsU » Mon Aug 17, 2009 4:36 pm

1. Thanks, ill try that in a mo :)

2. how about if its in a folder in the root of the site (eg .com/blah/blah.php), does phpinclude allow folders so <%phpinclude(blah/blah.php)%> would work?

3. ok cheers :)
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Mon Aug 17, 2009 4:50 pm

You need to put the include folder in your skin's folder or specify an absolute filename like <%phpinclude(/users/mysite.com/public_html/blah.php)%>
Is your question not solved yet?

Search our FAQ,

read the Documentation, or

browse the list of available plugins.



Check out my plugins
DeathawaitsU
Posts: 17
Joined: Thu Aug 13, 2009 4:14 pm

Postby DeathawaitsU » Mon Aug 17, 2009 5:13 pm

Ok thanks :)

Regarding 1, that works great, but obviously i lose my full blog listing because of that, so ive created a custom page called blog that calls the full blog which is perfect. Only issue i have is if i click catagories > show all it obviously shows my homepage instead of the blog, how can i change it?
Bar that you've provided the beginnings of a perfect solution :)
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Mon Aug 17, 2009 5:18 pm

In the template used by your skin to format the categorylist (called from the categorylist skinvar in your sidebar, and default/index for the default skin), edit the Category List Header field. It might look like this:

Code: Select all

<dd>
<a href="<%blogurl%>" title="All categories">All</a>
</dd>

Change it to something like this:

Code: Select all

<dd>
<a href="index.php?special=blog" title="All categories">All</a>
</dd>
Is your question not solved yet?

Search our FAQ,

read the Documentation, or

browse the list of available plugins.



Check out my plugins
DeathawaitsU
Posts: 17
Joined: Thu Aug 13, 2009 4:14 pm

Postby DeathawaitsU » Mon Aug 17, 2009 5:24 pm

Cheers dude :) Sorted

Return to “General Questions”